You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / i0

_ArrayFunctionDispatcher

numpy:i0

source: /numpy/lib/_function_base_impl.py :3532

Signature

def   i0 ( x )

Summary

Modified Bessel function of the first kind, order 0.

Extended Summary

Usually denoted .

Parameters

x : array_like of float

Argument of the Bessel function.

Returns

out : ndarray, shape = x.shape, dtype = float

The modified Bessel function evaluated at each of the elements of x.

Notes

The scipy implementation is recommended over this function: it is a proper ufunc written in C, and more than an order of magnitude faster.

We use the algorithm published by Clenshaw [1] and referenced by Abramowitz and Stegun [2], for which the function domain is partitioned into the two intervals [0,8] and (8,inf), and Chebyshev polynomial expansions are employed in each interval. Relative error on the domain [0,30] using IEEE arithmetic is documented [3] as having a peak of 5.8e-16 with an rms of 1.4e-16 (n = 30000).

Examples

import numpy as np
np.i0(0.)
np.i0([0, 1, 2, 3])

See also

scipy.special.i0
scipy.special.iv
scipy.special.ive

Aliases

  • numpy.i0