pchip_1d#
- exo_skryer.aux_functions.pchip_1d(x: Array, x_nodes: Array, y_nodes: Array) Array[source]#
Piecewise Cubic Hermite Interpolating Polynomial (PCHIP).
Provides a 1D monotonic cubic interpolation. Values outside the node range are clipped to the boundary values.
- Parameters:
- x
ndarray The x-coordinates at which to evaluate the interpolated values. Can be any shape; interpolation is performed element-wise.
- x_nodes
ndarray 1D array of data point x-coordinates, must be sorted in ascending order. Minimum length is 2.
- y_nodes
ndarray 1D array of data point y-coordinates corresponding to
x_nodes. Must have the same length asx_nodes.
- x
- Returns:
- y
ndarray The interpolated values at positions
x, with the same shape asx. Values are computed using shape-preserving cubic Hermite interpolation. Points outside the range [x_nodes[0], x_nodes[-1]] are clipped to boundary values.
- y