pyinterp.interpolate1d#

pyinterp.interpolate1d(x: pyinterp.core.Axis, y: numpy.ndarray[numpy.float64[m, 1]], xi: numpy.ndarray[numpy.float64[m, 1]], half_window_size: int = 3, bounds_error: bool = True, kind: str = 'c_spline') numpy.ndarray[numpy.float64[m, 1]]#

Interpolate a 1D function

Parameters:
  • x – Axis of the function to be interpolated

  • y – Values of the function to be interpolated

  • xi – Coordinate of the value to be interpolated

  • half_window_size – Size of the half window. Default is 3.

  • bounds_error – If true, an exception is raised if the value to be interpolated is out of the range of the axis.

  • kind – Type of spline to be used. Default is cubic spline. Possible values are: linear, c_spline, c_spline_periodic, akima, akima_periodic, steffen.

Returns:

The interpolated value