| 2320 | assert_allclose(expected, actual, rtol=1e-16) |
| 2321 | |
| 2322 | def test_resample_offset(self) -> None: |
| 2323 | times = pd.date_range("2000-01-01T02:03:01", freq="6h", periods=10) |
| 2324 | array = DataArray(np.arange(10), [("time", times)]) |
| 2325 | |
| 2326 | offset = pd.Timedelta("11h") |
| 2327 | actual = array.resample(time="24h", offset=offset).mean() |
| 2328 | expected = DataArray(array.to_series().resample("24h", offset=offset).mean()) |
| 2329 | assert_identical(expected, actual) |
| 2330 | |
| 2331 | def test_resample_origin(self) -> None: |
| 2332 | times = pd.date_range("2000-01-01T02:03:01", freq="6h", periods=10) |