# jax.numpy.i0Â¶

jax.numpy.i0(x)[source]Â¶

Modified Bessel function of the first kind, order 0.

LAX-backend implementation of i0(). Original docstring below.

Usually denoted $$I_0$$. This function does broadcast, but will not â€śup-castâ€ť int dtype arguments unless accompanied by at least one float or complex dtype argument (see Raises below).

Parameters

x (array_like, dtype float or complex) â€“ Argument of the Bessel function.

Returns

out â€“ The modified Bessel function evaluated at each of the elements of x.

Return type

ndarray, shape = x.shape, dtype = x.dtype

Raises

TypeError â€“ array cannot be safely cast to required type: If argument consists exclusively of int dtypes.

scipy.special.i0(), scipy.special.iv(), scipy.special.ive()

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).

References

1

C. W. Clenshaw, â€śChebyshev series for mathematical functionsâ€ť, in National Physical Laboratory Mathematical Tables, vol. 5, London: Her Majestyâ€™s Stationery Office, 1962.

2

M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions, 10th printing, New York: Dover, 1964, pp. 379. http://www.math.sfu.ca/~cbm/aands/page_379.htm

3

http://kobesearch.cpan.org/htdocs/Math-Cephes/Math/Cephes.html

Examples

>>> np.i0(0.)
array(1.0)  # may vary
>>> np.i0([0., 1. + 2j])
array([ 1.00000000+0.j        ,  0.18785373+0.64616944j])  # may vary