From 9e93e8b7102986b1bdd75a5d5a59f925727b6ce8 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 15 Sep 2020 19:59:03 +0200 Subject: [PATCH] test for last commit --- python/tests/test_Rotation.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/tests/test_Rotation.py b/python/tests/test_Rotation.py index 3ed1f27c6..1696ef247 100644 --- a/python/tests/test_Rotation.py +++ b/python/tests/test_Rotation.py @@ -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: