mindscience.e3nn.o3.matrix_z

mindscience.e3nn.o3.matrix_z(angle)[source]

Return the \(3 \times 3\) rotation matrix for a rotation about the z-axis by the given angle.

Parameters

angle (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The rotation angles around z axis. The shape of 'angle' is \((...)\).

Returns

Tensor, the rotation matrices around z axis. The shape of output is \((..., 3, 3)\).

Examples

>>> from mindscience.e3nn.o3 import matrix_z
>>> m = matrix_z(0.6)
>>> print(m)
[[ 0.8253357 -0.5646425  0.       ]
[ 0.5646425  0.8253357  0.       ]
[ 0.         0.         1.       ]]