Invert a torch or numpy matrix
(mat)
| 1038 | |
| 1039 | |
| 1040 | def inv(mat): |
| 1041 | """ |
| 1042 | Invert a torch or numpy matrix |
| 1043 | """ |
| 1044 | if isinstance(mat, torch.Tensor): |
| 1045 | return torch.linalg.inv(mat) |
| 1046 | if isinstance(mat, np.ndarray): |
| 1047 | return np.linalg.inv(mat) |
| 1048 | raise ValueError(f"bad matrix type = {type(mat)}") |
| 1049 | |
| 1050 | |
| 1051 | def closed_form_pose_inverse( |
nothing calls this directly
no outgoing calls
no test coverage detected