mindspore.ops.rad2deg
- mindspore.ops.rad2deg(x)[source]
Converts angles in radians to angles in degrees element-wise.
- Parameters
x (Tensor) – The input tensor.
- Returns
Tensor, has the same shape and dtype as the x.
- Raises
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> from mindspore import Tensor >>> from mindspore import ops >>> x = Tensor([[6.283, -3.142],[1.570, -6.283],[3.142, -1.570]], mindspore.float32) >>> output = ops.rad2deg(x) >>> print(output) [[ 359.98935 -180.02333] [ 89.95438 -359.98935] [ 180.02333 -89.95438]]