pyinterp.backends.xarray.RegularGridInterpolator.__call__

RegularGridInterpolator.__call__(coords: Dict, method: str = 'bilinear', bounds_error: bool = False, bicubic_kwargs: Optional[Dict] = None, num_threads: int = 0) numpy.ndarray[source]

Interpolation at coordinates

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

  • method (str, optional) – The method of interpolation to perform. Supported are bicubic, 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 data, a ValueError is raised. If False, then nan is used.

  • bicubic_kwargs (dict, optional) – 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 (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.

Returns

New array on the new coordinates.

Return type

numpy.ndarray