scipy.special.sindg
- scipy.special.sindg(x, out=None) = <ufunc 'sindg'>
Sine of the angle x given in degrees.
- Parameters:
- x : array_like
Angle, given in degrees.
- outndarray, optional
Sine of the angle x given in degrees.
Angle, given in degrees.
Optional output array for the function results.
Sine at the input.
Array API Standard Support
sindg has experimental support for Python Array API Standard compatible
backends in addition to NumPy. Please consider testing these features
by setting an environment variable SCIPY_ARRAY_API=1 and providing
CuPy, PyTorch, JAX, or Dask arrays as array arguments. 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 |
See Support for the array API standard for more information.
>>> import numpy as np
>>> import scipy.special as sc
It is more accurate than using sine directly.
>>> x = 180 * np.arange(3)
>>> sc.sindg(x)
array([ 0., -0., 0.])
>>> np.sin(x * np.pi / 180)
array([ 0.0000000e+00, 1.2246468e-16, -2.4492936e-16])