scipy.integrate.romb¶
- scipy.integrate.romb(y, dx=1.0, axis=- 1, show=False)[源代码]¶
龙贝格积分使用的一个函数的示例。
- 参数
- yarray_like
向量为
2**k + 1函数的等间距样本。- dx浮动,可选
采样间距。默认值为1。
- axis整型,可选
要沿其进行集成的轴。默认值为-1(最后一个轴)。
- show布尔值,可选
什么时候 y 是单个一维数组,则如果此参数为True,则打印显示从样本中推断Richardson的表。默认值为False。
- 退货
- rombndarray
的综合结果 axis 。
参见
quad使用故障诊断仪的自适应正交
romberg自适应Romberg求积
quadrature自适应高斯求积
fixed_quad定阶高斯求积
dblquad重积分
tplquad三重积分
simpson采样数据的积分器
cumulative_trapezoid采样数据的累积积分
odeODE积分器
odeintODE积分器
示例
>>> from scipy import integrate >>> x = np.arange(10, 14.25, 0.25) >>> y = np.arange(3, 12)
>>> integrate.romb(y) 56.0
>>> y = np.sin(np.power(x, 2.5)) >>> integrate.romb(y) -0.742561336672229
>>> integrate.romb(y, show=True) Richardson Extrapolation Table for Romberg Integration ==================================================================== -0.81576 4.63862 6.45674 -1.10581 -3.02062 -3.65245 -2.57379 -3.06311 -3.06595 -3.05664 -1.34093 -0.92997 -0.78776 -0.75160 -0.74256 ==================================================================== -0.742561336672229