bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _external / array_api_extra / _delegation / deg2rad
function
scipy._external.array_api_extra._delegation:deg2rad
source: build-install/usr/lib/python3.14/site-packages/scipy/_external/array_api_extra/_delegation.py:328
Signature
def deg2rad(x: Array, /, xp: ArrayNamespace | None = None) → ArraySummary
Convert angles from degrees to radians.
Parameters
x: arrayInput array in degrees. Must have an integral or floating-point dtype.
xp: array_namespace, optionalThe standard-compatible namespace for
x. Default: infer.
Returns
: arrayThe corresponding angles in radians. Integral inputs are converted to the default floating-point dtype.
Examples
import array_api_strict as xp import array_api_extra as xpx xpx.deg2rad(xp.asarray([0, 90, 180]), xp=xp)⚠
Traceback (most recent call last):
File "<doctest scipy._external.array_api_extra._delegation:deg2rad[0]>", line 1, in <module>
xpx.deg2rad(xp.asarray([0, 90, 180]), xp=xp)
^^^
NameError: name 'xpx' is not defined
Aliases
scipy.differentiate.xpx.deg2rad