From 235f3c0df7df26bc1d42ce50dd3131b2f03edf67 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 16 May 2020 11:16:52 +0200 Subject: [PATCH] bugfix: copy and paste error --- python/damask/_rotation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index a9f11c6c2..3a046363f 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -52,7 +52,7 @@ class Rotation: Parameters ---------- quaternion : numpy.ndarray, optional - Unit quaternion that follows the conventions. Use .fromQuaternion to perform a sanity check. + Unit quaternion that follows the conventions. Use .from_quaternion to perform a sanity check. """ self.quaternion = quaternion.copy() @@ -144,7 +144,7 @@ class Rotation: q_m = self.quaternion[...,0] p_m = self.quaternion[...,1:] A = q_m**2.0 - np.einsum('...i,...i',p_m,p_m) - B = 2.0 * np.einsum('...i,...i',p_m,p_m) + B = 2.0 * np.einsum('...i,...i',p_m,other) C = 2.0 * _P * q_m return np.block([(A * other[...,i]).reshape(self.shape+(1,)) + (B * p_m[...,i]).reshape(self.shape+(1,)) + @@ -481,7 +481,7 @@ class Rotation: else M + r.asM() * n # noqa add (multiples) of this rotation to average noqa eig, vec = np.linalg.eig(M/N) - return Rotation.fromQuaternion(np.real(vec.T[eig.argmax()]),acceptHomomorph = True) + return Rotation.from_quaternion(np.real(vec.T[eig.argmax()]),acceptHomomorph = True) @staticmethod def from_random(shape=None):