mindscience.e3nn.o3.xyz_to_angles
- mindscience.e3nn.o3.xyz_to_angles(xyz)[source]
Convert a point \(\vec r = (x, y, z)\) on the sphere into angles \((\alpha, \beta)\).
\[\vec r = R(\alpha, \beta, 0) \vec e_z\]- Parameters
xyz (Tensor) – The point \((x, y, z)\) on the sphere. The shape of Tensor is \((..., 3)\).
- Returns
tuple[Tensor]. A tuple of \(alpha\), \(beta\) Tensors.
Examples
>>> import mindspore as ms >>> from mindscience.e3nn.o3 import xyz_to_angles >>> input = ms.Tensor([3, 3, 3]) >>> m = xyz_to_angles(input) >>> print(m) (Tensor(shape=[], dtype=Float32, value= 0.785398), Tensor(shape=[], dtype=Float32, value= 0.955318))