naginterfaces.library.interp.dim1_​monotonic_​deriv

naginterfaces.library.interp.dim1_monotonic_deriv(x, f, d, px)[source]

dim1_monotonic_deriv evaluates a piecewise cubic Hermite interpolant and its first derivative at a set of points.

For full information please refer to the NAG Library document for e01bg

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/e01/e01bgf.html

Parameters
xfloat, array-like, shape

, , and must be unchanged from the previous call of dim1_monotonic().

ffloat, array-like, shape

, , and must be unchanged from the previous call of dim1_monotonic().

dfloat, array-like, shape

, , and must be unchanged from the previous call of dim1_monotonic().

pxfloat, array-like, shape

The values of at which the interpolant is to be evaluated.

Returns
pffloat, ndarray, shape

contains the value of the interpolant evaluated at the point , for .

pdfloat, ndarray, shape

contains the first derivative of the interpolant evaluated at the point , for .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, , and .

Constraint: for all .

(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

Warning – some points in array lie outside the range . Values at these points are unreliable because computed by extrapolation.

Notes

In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.

dim1_monotonic_deriv evaluates a piecewise cubic Hermite interpolant, as computed by dim1_monotonic(), at the points , for . The first derivatives at the points are also computed. If any point lies outside the interval from to , values of the interpolant and its derivative are extrapolated from the nearest extreme cubic, and a warning is returned.

If values of the interpolant only, and not of its derivative, are required, dim1_monotonic_eval() should be used.

The function is derived from function PCHFD in Fritsch (1982).

References

Fritsch, F N, 1982, PCHIP final specifications, Report UCID-30194, Lawrence Livermore National Laboratory