pyinterp.bivariate

pyinterp.bivariate(grid2d: pyinterp.grid.Grid2D, x: numpy.ndarray, y: numpy.ndarray, interpolator: str = 'bilinear', bounds_error: bool = False, num_threads: int = 0, **kwargs) numpy.ndarray[source]

Interpolate the values provided on the defined bivariate function.

Parameters
  • grid2d (pyinterp.grid.Grid2D) – Function on a uniform 2-dimensional grid to be interpolated.

  • x (numpy.ndarray) – X-values.

  • y (numpy.ndarray) – Y-values.

  • interpolator (str, optional) – The method of interpolation to perform. Supported are bilinear, nearest, and inverse_distance_weighting. Default to bilinear.

  • bounds_error (bool, optional) – If True, when interpolated values are requested outside of the domain of the input axes (x,y), a ValueError is raised. If False, then the value is set to NaN. Default to False.

  • num_threads (int, optional) – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.

  • p (int, optional) – The power to be used by the interpolator inverse_distance_weighting. Default to 2.

Returns

Values interpolated.

Return type

numpy.ndarray