scipy.special.ber#
- scipy.special.ber(x, out=None) = <wrapped_ufunc 'ber'>#
Kelvin function ber.
Defined as
\[\mathrm{ber}(x) = \Re[J_0(x e^{3 \pi i / 4})]\]where \(J_0\) is the Bessel function of the first kind of order zero (see
jv). See [dlmf] for more details.- Parameters:
- xarray_like
Real argument.
- outndarray, optional
Optional output array for the function results.
- Returns:
- scalar or ndarray
Values of the Kelvin function.
See also
Notes
Array API Standard Support
berhas 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 typically none of the other ufunc kwargs.outis 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.outis never supported for JAX because JAX arrays are immutable.berdoes not currently supportoutfor the PyTorch backend.See Array API coverage for more information.
References
[dlmf]NIST, Digital Library of Mathematical Functions, https://dlmf.nist.gov/10.61
Examples
It can be expressed using Bessel functions.
>>> import numpy as np >>> import scipy.special as sc >>> x = np.array([1.0, 2.0, 3.0, 4.0]) >>> sc.jv(0, x * np.exp(3 * np.pi * 1j / 4)).real array([ 0.98438178, 0.75173418, -0.22138025, -2.56341656]) >>> sc.ber(x) array([ 0.98438178, 0.75173418, -0.22138025, -2.56341656])