rad2deg

rad2deg(x, out=None, **kwargs)

Convert angles from radians to degrees. Parameters ———- x : ndarray or scalar

Angles in degrees.
out : ndarray or None, optional
A location into which the result is stored. If not provided or None, a freshly-allocated array is returned.
Returns:
y : ndarray or scalar

The corresponding angle in radians. This is a scalar if x is a scalar.

Notes

“rad2deg(x)” is “x * 180 / pi”.

This function differs from the original numpy.arange in the following aspects:
  • Only support float32 and float64.
  • out must be in the same size of input.

Examples

>>> np.rad2deg(np.pi/2)
90.0