numpy.i0

numpy.i0(x)[源代码]

第一类修正贝塞尔函数,0阶。

通常表示 I_0 .

参数
x浮点数数组

贝塞尔函数的参数。

返回
outndarray,shape=x.shape,dtype=float

修正的贝塞尔函数在 x .

笔记

建议在这个函数上使用scipy实现:它是一个用C编写的合适的ufunc,并且比C快一个数量级。

我们使用克伦肖发布的算法 [1] 由Abramowitz和Stegun引用 [2], 将函数域划分为两个区间 [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] 峰值为5.8e-16,均方根值为1.4e-16(n=30000)。

工具书类

1

C.W.克伦肖,“切比雪夫数理函数系列”,in 国家物理实验室数学表 ,第5卷,伦敦:女王文具办公室,1962年。

2

M.Abramowitz和I.A.Stegun, 数学函数手册 ,第10次印刷,纽约:多佛,1964年,第379页。http://www.math.sfu.ca/~cbm/aands/page_.htm

3

https://metapan.org/pod/distribution/Math-Cephes/lib/Math/Cephes.pod#i0:-零阶修正贝塞尔函数

实例

>>> np.i0(0.)
array(1.0)
>>> np.i0([0, 1, 2, 3])
array([1.        , 1.26606588, 2.2795853 , 4.88079259])