scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
romb(y, dx=1.0, axis=-1, show=False)

Parameters

y : array_like

A vector of 2**k + 1 equally-spaced samples of a function.

dx : float, optional

The sample spacing. Default is 1.

axis : int, optional

The axis along which to integrate. Default is -1 (last axis).

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 : ndarray

The integrated result for :None:None:`axis`.

Romberg integration using samples of a function.

See Also

cumulative_trapezoid

cumulative integration for sampled data

dblquad

double integrals

fixed_quad

fixed-order Gaussian quadrature

ode

ODE integrators

odeint

ODE integrators

quad

adaptive quadrature using QUADPACK

quadrature

adaptive Gaussian quadrature

romberg

adaptive Romberg quadrature

simpson

integrators for sampled data

tplquad

triple integrals

Examples

>>> 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
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.integrate._quadrature.simpson scipy.integrate._quadpack_py.dblquad scipy.integrate._quadrature.quadrature scipy.integrate._quadrature.romb scipy.integrate._quadrature.fixed_quad scipy.integrate._quadrature.cumulative_trapezoid scipy.integrate._quadpack_py.quad scipy.integrate._quadrature.romberg scipy.integrate._quadpack_py.tplquad

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/integrate/_quadrature.py#559
type: <class 'function'>
Commit: