mindspore.numpy.rad2deg
- mindspore.numpy.rad2deg(x, dtype=None)[source]
Converts angles from radians to degrees.
- Parameters
x (Tensor) – Angles in radians.
dtype (
mindspore.dtype
, optional) – defaults to None. Overrides the dtype of the output Tensor.
- Returns
Tensor, the corresponding angle in degrees. This is a tensor scalar if x is a tensor scalar.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore.numpy as np >>> x = np.asarray([1, 2, 3, -4, -5]) >>> output = np.rad2deg(x) >>> print(output) [ 57.295776 114.59155 171.88733 -229.1831 -286.47888 ]