bundles / scipy 1.17.1 / scipy / interpolate / _fitpack2 / UnivariateSpline / antiderivative
function
scipy.interpolate._fitpack2:UnivariateSpline.antiderivative
Signature
def antiderivative ( self , n = 1 ) Summary
Construct a new spline representing the antiderivative of this spline.
Parameters
n: int, optionalOrder of antiderivative to evaluate. Default: 1
Returns
spline: UnivariateSplineSpline of order k2=k+n representing the antiderivative of this spline.
Notes
Examples
import numpy as np from scipy.interpolate import UnivariateSpline x = np.linspace(0, np.pi/2, 70) y = 1 / np.sqrt(1 - 0.8*np.sin(x)**2) spl = UnivariateSpline(x, y, s=0)✓
spl(1.7), spl.antiderivative().derivative()(1.7)
✗ispl = spl.antiderivative()
✓ispl(np.pi/2) - ispl(0)
✗from scipy.special import ellipk
✓ellipk(0.8)
✗See also
- derivative
- splantider
Aliases
-
scipy.interpolate.UnivariateSpline.antiderivative