orientation matrix shape checked in “ fromMatrix “ function

This commit is contained in:
Tias Maiti 2015-05-28 21:52:05 +00:00
parent 147cc91496
commit 9d5ca8b631
1 changed files with 1 additions and 1 deletions

View File

@ -757,7 +757,7 @@ class Orientation:
self.quaternion = Quaternion.fromRandom()
elif isinstance(Eulers, np.ndarray) and Eulers.shape == (3,): # based on given Euler angles
self.quaternion = Quaternion.fromEulers(Eulers,'bunge')
elif isinstance(matrix, np.ndarray) and matrix.shape == (3,3): # based on given rotation matrix
elif isinstance(matrix, np.ndarray) : # based on given rotation matrix
self.quaternion = Quaternion.fromMatrix(matrix)
elif isinstance(angleAxis, np.ndarray) and angleAxis.shape == (4,): # based on given angle and rotation axis
self.quaternion = Quaternion.fromAngleAxis(angleAxis[0],angleAxis[1:4])