mindspore.ops.rad2deg
- mindspore.ops.rad2deg(x)[source]
Returns a new tensor with each of the elements of x converted from angles in radians to degrees.
- 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 >>> import mindspore.ops as 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]]