def test_Rodrigues(self, set_of_rotations, normalize, P): c = np.array([P * -1, P * -1, P * -1, 1.]) for rot in set_of_rotations: m = rot.as_matrix() o = Rotation.from_Rodrigues(rot.as_Rodrigues() * c, normalize, P).as_matrix() ok = np.allclose(m, o, atol=atol) assert ok and np.isclose(np.linalg.det(o), 1.0), f'{m},{o}'
def test_Rodrigues(self, default, normalise, P): c = np.array([P * -1, P * -1, P * -1, 1.]) for rot in default: m = rot.as_matrix() o = Rotation.from_Rodrigues(rot.as_Rodrigues() * c, normalise, P).as_matrix() ok = np.allclose(m, o, atol=atol) print(m, o) assert ok and np.isclose(np.linalg.det(o), 1.0)