xrscipy.integrate.romb
- xrscipy.integrate.romb(obj, coord, show=False)
romb(obj, coord, show=False)
- Parameters:
obj (xarray object) – A vector of
2**k + 1
equally-spaced samples of a function.coord (string) – The coordinate along which to integrate.
show (bool, optional) – When y is a single 1-D array, then if this argument is True print the table showing Richardson extrapolation from the samples. Default is False.
- Returns:
romb – The integrated result for axis.
- Return type:
ndarray
See also
quad
adaptive quadrature using QUADPACK
romberg
adaptive Romberg quadrature
quadrature
adaptive Gaussian quadrature
fixed_quad
fixed-order Gaussian quadrature
dblquad
double integrals
tplquad
triple integrals
simpson
integrators for sampled data
cumulative_trapezoid
cumulative integration for sampled data
ode
ODE integrators
odeint
ODE integrators
scipy.integrate.romb
scipy.integrate.romb : Original scipy implementation
Examples
>>> from scipy import integrate >>> import numpy as np >>> x = np.arange(10, 14.25, 0.25) >>> y = np.arange(3, 12)
Examples
>>> integrate.romb(y) 56.0
Examples
>>> y = np.sin(np.power(x, 2.5)) >>> integrate.romb(y) -0.742561336672229
Examples
>>> 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 # may vary