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

Function test_nans

xarray/tests/test_interp.py:495–507  ·  view source on GitHub ↗
(use_dask: bool)

Source from the content-addressed store, hash-verified

493
494@pytest.mark.parametrize("use_dask", [True, False])
495def test_nans(use_dask: bool) -> None:
496 if not has_scipy:
497 pytest.skip("scipy is not installed.")
498
499 da = xr.DataArray([0, 1, np.nan, 2], dims="x", coords={"x": range(4)})
500
501 if not has_dask and use_dask:
502 pytest.skip("dask is not installed in the environment.")
503 da = da.chunk()
504
505 actual = da.interp(x=[0.5, 1.5])
506 # not all values are nan
507 assert actual.count() > 0
508
509
510@requires_scipy

Callers

nothing calls this directly

Calls 3

chunkMethod · 0.95
interpMethod · 0.95
countMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…