This function is used to convert the angles from radians to degrees.
numpy.rad2deg(array, out)
It returns an array containing equivalent degree angles of the radians given in the input array.
import numpy as np import math arr = [0, math.pi/2, math.pi/4, math.pi/6 ] print ("Input array : \n", arr) degval = np.rad2deg(arr) print ("\n Degree value : \n", degval)
Output: