()
| 237 | |
| 238 | |
| 239 | def 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…