bundles / scipy latest / scipy / interpolate / _fitpack2 / UnivariateSpline / integral
function
scipy.interpolate._fitpack2:UnivariateSpline.integral
Signature
def integral ( self , a , b ) Summary
Return definite integral of the spline between two given points.
Parameters
a: floatLower limit of integration.
b: floatUpper limit of integration.
Returns
integral: floatThe value of the definite integral of the spline between limits.
Examples
import numpy as np from scipy.interpolate import UnivariateSpline x = np.linspace(0, 3, 11) y = x**2 spl = UnivariateSpline(x, y) spl.integral(0, 3)✓
spl.integral(-1, 4) spl.integral(-1, 0)✓
Aliases
-
scipy.interpolate.UnivariateSpline.integral