mindscience.e3nn.o3.matrix_x

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

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

Parameters

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

Returns

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

Examples

>>> from mindscience.e3nn.o3 import matrix_x
>>> m = matrix_x(0.4)
>>> print(m)
[[ 1.          0.          0.        ]
[ 0.          0.92106086 -0.38941833]
[ 0.          0.38941833  0.92106086]]