()
| 1110 | |
| 1111 | @requires_scipy |
| 1112 | def test_interp_non_numeric_nd() -> None: |
| 1113 | # regression test for GH8099, GH9839 |
| 1114 | ds = xr.Dataset({"x": ("a", np.arange(4))}, coords={"a": (np.arange(4) - 1.5)}) |
| 1115 | t = xr.DataArray( |
| 1116 | np.random.randn(6).reshape((2, 3)) * 0.5, |
| 1117 | dims=["r", "s"], |
| 1118 | coords={"r": np.arange(2) - 0.5, "s": np.arange(3) - 1}, |
| 1119 | ) |
| 1120 | ds["m"] = ds.x > 1 |
| 1121 | |
| 1122 | actual = ds.interp(a=t, method="linear") |
| 1123 | # with numeric only |
| 1124 | expected = ds[["x"]].interp(a=t, method="linear") |
| 1125 | assert_identical(actual[["x"]], expected) |
| 1126 | |
| 1127 | |
| 1128 | @requires_dask |
nothing calls this directly
no test coverage detected
searching dependent graphs…