numpy.deg2rad

numpy.deg2rad(x[, out])

Convert angles from degrees to radians. This is the same function as radians, but deg2rad is a more descriptive name.

Parameters:

x : array_like

Angles in degrees.

Returns:

y : ndarray

The corresponding angle in radians.

See also

radians
Convert angles from degrees to radians.
rad2deg
Convert angles from radians to degrees.
degrees
Convert angles from radians to degrees.
unwrap
Remove large jumps in angle by wrapping.

Notes

deg2rad(x) is x * pi / 180.

Examples

>>> np.deg2rad(180)
3.1415926535897931

This Page

Quick search