test for last commit

This commit is contained in:
Martin Diehl 2020-09-15 19:59:03 +02:00
parent d02617c961
commit 9e93e8b710
1 changed files with 9 additions and 0 deletions

View File

@ -686,6 +686,15 @@ class TestRotation:
print(u,c)
assert np.allclose(single(u),c) and np.allclose(single(u),vectorized(u))
@pytest.mark.parametrize('func',[Rotation.from_axis_angle])
def test_normalization_vectorization(self,func):
"""Check vectorized implementation normalization."""
vec = np.random.rand(5,4)
ori = func(vec,normalize=True)
for v,o in zip(vec,ori):
assert np.allclose(func(v,normalize=True).as_quaternion(),o.as_quaternion())
@pytest.mark.parametrize('degrees',[True,False])
def test_Eulers(self,set_of_rotations,degrees):
for rot in set_of_rotations: