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

Function test_interpolators

xarray/tests/test_missing.py:348–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

346
347@requires_scipy
348def test_interpolators():
349 for method, interpolator in [
350 ("linear", NumpyInterpolator),
351 ("linear", ScipyInterpolator),
352 ("spline", SplineInterpolator),
353 ]:
354 xi = np.array([-1, 0, 1, 2, 5], dtype=np.float64)
355 yi = np.array([-10, 0, 10, 20, 50], dtype=np.float64)
356 x = np.array([3, 4], dtype=np.float64)
357
358 f = interpolator(xi, yi, method=method)
359 out = f(x)
360 assert pd.isnull(out).sum() == 0
361
362
363def test_interpolate_use_coordinate():

Callers

nothing calls this directly

Calls 3

fFunction · 0.70
sumMethod · 0.45
isnullMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…