# scipy.interpolate.NdPPoly.integrate_1d#

NdPPoly.integrate_1d(a, b, axis, extrapolate=None)[source]#

Compute NdPPoly representation for one dimensional definite integral

The result is a piecewise polynomial representing the integral:

$p(y, z, ...) = \int_a^b dx\, p(x, y, z, ...)$

where the dimension integrated over is specified with the axis parameter.

Parameters:
a, bfloat

Lower and upper bound for integration.

axisint

Dimension over which to compute the 1-D integrals

extrapolatebool, optional

Whether to extrapolate to out-of-bounds points based on first and last intervals, or to return NaNs.

Returns:
igNdPPoly or array-like

Definite integral of the piecewise polynomial over [a, b]. If the polynomial was 1D, an array is returned, otherwise, an NdPPoly object.