from_matrix#
- classmethod Rotation.from_matrix(matrix: Union[ndarray, tuple, list]) Rotation [source]#
Return rotations from the orientation matrices [Rowenhorst et al., 2015].
- Parameters:
- matrix
Sequence of orientation matrices with the last two dimensions of shape
(3, 3)
.
- Returns:
r
Rotations.
Examples
>>> from orix.quaternion import Rotation >>> r = Rotation.from_matrix([np.identity(3), np.diag([1, -1, -1])]) >>> r Rotation (2,) [[1. 0. 0. 0.] [0. 1. 0. 0.]]