(self, center, dims)
| 1015 | @pytest.mark.parametrize("center", [[True, True], [False, False]]) |
| 1016 | @pytest.mark.parametrize("dims", [("x", "y"), ("y", "z"), ("z", "x")]) |
| 1017 | def test_nd_rolling(self, center, dims): |
| 1018 | x = self.cls( |
| 1019 | ("x", "y", "z"), |
| 1020 | np.arange(7 * 6 * 8).reshape(7, 6, 8).astype(float), |
| 1021 | ) |
| 1022 | window = [3, 3] |
| 1023 | actual = x.rolling_window( |
| 1024 | dim=dims, |
| 1025 | window=window, |
| 1026 | window_dim=[f"{k}w" for k in dims], |
| 1027 | center=center, |
| 1028 | fill_value=np.nan, |
| 1029 | ) |
| 1030 | expected = x |
| 1031 | for dim, win, cent in zip(dims, window, center, strict=True): |
| 1032 | expected = expected.rolling_window( |
| 1033 | dim=dim, |
| 1034 | window=win, |
| 1035 | window_dim=f"{dim}w", |
| 1036 | center=cent, |
| 1037 | fill_value=np.nan, |
| 1038 | ) |
| 1039 | assert_equal(actual, expected) |
| 1040 | |
| 1041 | @pytest.mark.parametrize( |
| 1042 | ("dim, window, window_dim, center"), |
nothing calls this directly
no test coverage detected