small changes suggested by Franz
This commit is contained in:
parent
39cc9e35ae
commit
9b0d3def1d
|
@ -83,7 +83,7 @@ class Rotation:
|
|||
])
|
||||
elif other.shape == (3,3,): # rotate a single (3x3)-matrix
|
||||
return np.dot(self.asMatrix(),np.dot(other,self.asMatrix().T))
|
||||
elif other.shape == (3,3,3,3):
|
||||
elif other.shape == (3,3,3,3,):
|
||||
raise NotImplementedError
|
||||
else:
|
||||
return NotImplemented
|
||||
|
|
|
@ -78,10 +78,8 @@ class Quaternion:
|
|||
return NotImplemented
|
||||
|
||||
def __neg__(self):
|
||||
"""Unary positive operator"""
|
||||
self.q *= -1.0
|
||||
self.p *= -1.0
|
||||
return self
|
||||
"""Unary negative operator"""
|
||||
return self * -1.0
|
||||
|
||||
|
||||
def __mul__(self, other):
|
||||
|
@ -208,8 +206,7 @@ class Quaternion:
|
|||
|
||||
def homomorph(self):
|
||||
"""Homomorphs in-place"""
|
||||
self.q = -self.q
|
||||
self.p = -self.p
|
||||
self *= -1.0
|
||||
return self
|
||||
|
||||
def homomorphed(self):
|
||||
|
|
Loading…
Reference in New Issue