(use_dask: bool)
| 493 | |
| 494 | @pytest.mark.parametrize("use_dask", [True, False]) |
| 495 | def 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 |