mindspore.numpy.rad2deg

mindspore.numpy.rad2deg(x, dtype=None)[源代码]

Converts angles from radians to degrees.

参数
  • x (Tensor) – Angles in radians.

  • dtype (mindspore.dtype, optional) – Defaults to None. Overrides the dtype of the output Tensor.

返回

Tensor, the corresponding angle in degrees. This is a tensor scalar if x is a tensor scalar.

Supported Platforms:

Ascend GPU CPU

样例

>>> 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 ]