(self, dtype)
| 3898 | assert_allclose(expected, actual) |
| 3899 | |
| 3900 | def test_resample(self, dtype): |
| 3901 | array = np.linspace(0, 5, 10).astype(dtype) * unit_registry.m |
| 3902 | |
| 3903 | time = xr.date_range("10-09-2010", periods=len(array), freq="YE") |
| 3904 | data_array = xr.DataArray(data=array, coords={"time": time}, dims="time") |
| 3905 | units = extract_units(data_array) |
| 3906 | |
| 3907 | func = method("resample", time="6ME") |
| 3908 | |
| 3909 | expected = attach_units(func(strip_units(data_array)).mean(), units) |
| 3910 | actual = func(data_array).mean() |
| 3911 | |
| 3912 | assert_units_equal(expected, actual) |
| 3913 | assert_identical(expected, actual) |
| 3914 | |
| 3915 | @pytest.mark.parametrize("compute_backend", ["numbagg", None], indirect=True) |
| 3916 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected