This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

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) → Array

Summary

Convert angles from radians to degrees.

Parameters

x : array

Input array in radians. Must have an integral or floating-point dtype.

xp : array_namespace, optional

The standard-compatible namespace for x. Default: infer.

Returns

: array

The 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