diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index 145b27884..a77c40ca5 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -107,22 +107,6 @@ class Rotation: and np.allclose(self.quaternion,other.quaternion) - def __neq__(self,other): - """ - Not Equal to other. - - Equality is determined taking limited floating point precision into - account. See numpy.allclose for details. - - Parameters - ---------- - other : Rotation - Rotation to check for inequality. - - """ - return not self.__eq__(other) - - @property def shape(self): return self.quaternion.shape[:-1] diff --git a/python/tests/test_Rotation.py b/python/tests/test_Rotation.py index 20eb49b7e..fe30726e3 100644 --- a/python/tests/test_Rotation.py +++ b/python/tests/test_Rotation.py @@ -769,15 +769,16 @@ class TestRotation: @pytest.mark.parametrize('shape',[None,1,(4,4)]) def test_random(self,shape): - Rotation.from_random(shape) + r = Rotation.from_random(shape) + if shape is None: + assert r.shape == () + elif shape == 1: + assert r.shape == (1,) + else: + assert r.shape == shape def test_equal(self): - r = Rotation.from_random() - assert r == r - - def test_unequal(self): - r = Rotation.from_random() - assert not (r != r) + assert Rotation.from_random(seed=1) == Rotation.from_random(seed=1) def test_inversion(self): r = Rotation.from_random()