This function is used to convert the angles from degree to radian.
numpy.deg2rad(array, out)
It returns an array containing equivalent degree angles to the radian 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) radval = np.deg2rad(arr) print ("\n Radian value : \n", radval)
Output: