()
| 750 | @requires_cftime |
| 751 | @requires_scipy |
| 752 | def test_cftime() -> None: |
| 753 | times = xr.date_range("2000", periods=24, freq="D", use_cftime=True) |
| 754 | da = xr.DataArray(np.arange(24), coords=[times], dims="time") |
| 755 | |
| 756 | times_new = xr.date_range( |
| 757 | "2000-01-01T12:00:00", periods=3, freq="D", use_cftime=True |
| 758 | ) |
| 759 | actual = da.interp(time=times_new) |
| 760 | expected = xr.DataArray([0.5, 1.5, 2.5], coords=[times_new], dims=["time"]) |
| 761 | |
| 762 | assert_allclose(actual, expected) |
| 763 | |
| 764 | |
| 765 | @requires_cftime |
nothing calls this directly
no test coverage detected
searching dependent graphs…