MCPcopy
hub / github.com/pydata/xarray / test_interpolate_2d_coord_raises

Function test_interpolate_2d_coord_raises

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

Source from the content-addressed store, hash-verified

237
238
239def test_interpolate_2d_coord_raises():
240 coords = {
241 "x": xr.Variable(("a", "b"), np.arange(6).reshape(2, 3)),
242 "y": xr.Variable(("a", "b"), np.arange(6).reshape(2, 3)) * 2,
243 }
244
245 data = np.random.randn(2, 3)
246 data[1, 1] = np.nan
247 da = xr.DataArray(data, dims=("a", "b"), coords=coords)
248 with pytest.raises(ValueError, match=r"interpolation must be 1D"):
249 da.interpolate_na(dim="a", use_coordinate="x")
250
251
252@requires_scipy

Callers

nothing calls this directly

Calls 2

interpolate_naMethod · 0.95
arangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…