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