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

Convert angles from radians to degrees.

  • 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.


  • y (ndarray or scalar) – The corresponding angle in radians. This is a scalar if x is a scalar.

  • .. note:: – “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.


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