pyinterp.backends.xarray.RegularGridInterpolator.__call__#

RegularGridInterpolator.__call__(coords: dict, method: str = 'bilinear', bounds_error: bool = False, bicubic_kwargs: dict | None = None, num_threads: int = 0, **kwargs) numpy.ndarray[source]#

Interpolation at coordinates.

Parameters:
  • coords – Mapping from dimension names to the new coordinates. New coordinate can be an scalar, array-like.

  • method – The method of interpolation to perform. Supported are bicubic, bilinear, nearest, and inverse_distance_weighting. Default to bilinear.

  • bounds_error – If True, when interpolated values are requested outside of the domain of the input data, a ValueError is raised. If False, then nan is used.

  • bicubic_kwargs – A dictionary of keyword arguments to pass on to the bicubic function. This is useful to control the parameters of this interpolator: window size in x, y and the edge control of the calculation windows.

  • num_threads – 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.

  • **kwargs – List of keyword arguments provided to the interpolation method pyinterp.bivariate, pyinterp.trivariate or pyinterp.quadrivariate depending on the number of dimensions of the grid.

Returns:

New array on the new coordinates.