scipy.special.i1e#
- scipy.special.i1e(x, out=None) = <ufunc 'i1e'>#
Exponentially scaled modified Bessel function of order 1.
Defined as:
i1e(x) = exp(-abs(x)) * i1(x)
- Parameters:
- xarray_like
Argument (float)
- outndarray, optional
Optional output array for the function values
- Returns:
- Iscalar or ndarray
Value of the exponentially scaled modified Bessel function of order 1 at x.
Notes
The range is partitioned into the two intervals [0, 8] and (8, infinity). Chebyshev polynomial expansions are employed in each interval. The polynomial expansions used are the same as those in
i1, but they are not multiplied by the dominant exponential factor.This function is a wrapper for the Cephes [1] routine
i1e.i1eis useful for large arguments x: for these,i1quickly overflows.Array API Standard Support
i1ehas 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 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.See Support for the array API standard for more information.
References
[1]Cephes Mathematical Functions Library, http://www.netlib.org/cephes/
Examples
In the following example
i1returns infinity whereasi1estill returns a finite number.>>> from scipy.special import i1, i1e >>> i1(1000.), i1e(1000.) (inf, 0.01261093025692863)
Calculate the function at several points by providing a NumPy array or list for x:
>>> import numpy as np >>> i1e(np.array([-2., 0., 6.])) array([-0.21526929, 0. , 0.15205146])
Plot the function between -10 and 10.
>>> import matplotlib.pyplot as plt >>> fig, ax = plt.subplots() >>> x = np.linspace(-10., 10., 1000) >>> y = i1e(x) >>> ax.plot(x, y) >>> plt.show()