MCPcopy Index your code
hub / github.com/pydata/xarray / _get_interpolator_nd

Function _get_interpolator_nd

xarray/core/missing.py:546–562  ·  view source on GitHub ↗

helper function to select the appropriate interpolator class returns interpolator class and keyword arguments for the class

(method, **kwargs)

Source from the content-addressed store, hash-verified

544
545
546def _get_interpolator_nd(method, **kwargs):
547 """helper function to select the appropriate interpolator class
548
549 returns interpolator class and keyword arguments for the class
550 """
551 valid_methods = tuple(get_args(InterpnOptions))
552 if method in valid_methods:
553 kwargs.update(method=method)
554 kwargs.setdefault("bounds_error", False)
555 interp_class = _import_interpolant("interpn", method)
556 else:
557 raise ValueError(
558 f"{method} is not a valid interpolator for interpolating "
559 "over multiple dimensions."
560 )
561
562 return interp_class, kwargs
563
564
565def _get_valid_fill_mask(arr, dim, limit):

Callers 1

interpolate_variableFunction · 0.85

Calls 2

_import_interpolantFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…