scipy.special.radian#

scipy.special.radian(d, m, s, out=None) = <ufunc 'radian'>#

Convert from degrees to radians.

Returns the angle given in (d)egrees, (m)inutes, and (s)econds in radians.

Parameters:
darray_like

Degrees, can be real-valued.

marray_like

Minutes, can be real-valued.

sarray_like

Seconds, can be real-valued.

outndarray, optional

Optional output array for the function results.

Returns:
scalar or ndarray

Values of the inputs in radians.

Notes

Array API Standard Support

radian has support for Python Array API Standard compatible backends in addition to NumPy. The following combinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

n/a

CuPy

n/a

PyTorch

JAX

Dask

n/a

For the NumPy backend, this function supports all NumPy ufunc keyword arguments. Other backends may support out, but none of the other ufunc kwargs. out is typically supported for CuPy and PyTorch, but not currently in cases where SciPy relies on a generic Array API implementation or, for PyTorch on CPU, falls back to the NumPy backend. out is never supported for JAX because JAX arrays are immutable. radian does not currently support out for the PyTorch backend.

See Support for the array API standard for more information.

Examples

>>> import scipy.special as sc

There are many ways to specify an angle.

>>> sc.radian(90, 0, 0)
1.5707963267948966
>>> sc.radian(0, 60 * 90, 0)
1.5707963267948966
>>> sc.radian(0, 0, 60**2 * 90)
1.5707963267948966

The inputs can be real-valued.

>>> sc.radian(1.5, 0, 0)
0.02617993877991494
>>> sc.radian(1, 30, 0)
0.02617993877991494