| 19 | |
| 20 | class Rolling: |
| 21 | def setup(self, *args, **kwargs): |
| 22 | self.ds = xr.Dataset( |
| 23 | { |
| 24 | "var1": (("x", "y"), randn_xy), |
| 25 | "var2": (("x", "t"), randn_xt), |
| 26 | "var3": (("t",), randn_t), |
| 27 | }, |
| 28 | coords={ |
| 29 | "x": np.arange(nx), |
| 30 | "y": np.linspace(0, 1, ny), |
| 31 | "t": pd.date_range("1970-01-01", periods=nt, freq="D"), |
| 32 | "x_coords": ("x", np.linspace(1.1, 2.1, nx)), |
| 33 | }, |
| 34 | ) |
| 35 | self.da_long = xr.DataArray( |
| 36 | randn_long, dims="x", coords={"x": np.arange(long_nx) * 0.1} |
| 37 | ) |
| 38 | |
| 39 | @parameterized( |
| 40 | ["func", "center", "use_bottleneck"], |