scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
integral(self, a, b)

Parameters

a : float

Lower limit of integration.

b : float

Upper limit of integration.

Returns

integral : float

The value of the definite integral of the spline between limits.

Return definite integral of the spline between two given points.

Examples

>>> from scipy.interpolate import UnivariateSpline
... x = np.linspace(0, 3, 11)
... y = x**2
... spl = UnivariateSpline(x, y)
... spl.integral(0, 3) 9.0

which agrees with $\int x^2 dx = x^3 / 3$ between the limits of 0 and 3.

A caveat is that this routine assumes the spline to be zero outside of the data limits:

>>> spl.integral(-1, 4)
9.0
>>> spl.integral(-1, 0)
0.0
See :

Back References

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

scipy.interpolate._fitpack2.UnivariateSpline.integral

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/interpolate/_fitpack2.py#389
type: <class 'function'>
Commit: