mindscience.e3nn.o3.matrix_to_angles
- mindscience.e3nn.o3.matrix_to_angles(r_param)[source]
Convert \(3 \times 3\) rotation matrix into Euler angles (\((\alpha, \beta, \gamma)\)).
- Parameters
r_param (Tensor) – The rotation matrices. Matrices of shape \((..., 3, 3)\).
- Returns
tuple[Tensor]. A tuple of \(alpha\), \(beta\), \(gamma\) Tensors.
- Raises
ValueError – If the det(R) is not equal to 1.
Examples
>>> import mindspore as ms >>> from mindscience.e3nn.o3 import matrix_to_angles >>> input = ms.Tensor([[0.5672197, 0.1866971, 0.8021259], [0.27070403, 0.87758255, -0.395687], ... [-0.77780527, 0.44158012,0.4472424]]) >>> m = matrix_to_angles(input) >>> print(m) (Tensor(shape=[], dtype=Float32, value= 0.4), Tensor(shape=[], dtype=Float32, value= 0.5), Tensor(shape=[], dtype=Float32, value= 0.6))