numpy.sin function in degrees? numpy.sin function in degrees? python python

numpy.sin function in degrees?


You don't want to convert to degrees, because you already have your number (90) in degrees. You need to convert 90 from degrees to radians, and you need to do it before you take the sine:

>>> np.sin(np.deg2rad(90))1.0

(You can use either deg2rad or radians.)


Use the math module from the standard Python library:

>>> math.sin(math.radians(90))