(self)
| 7771 | |
| 7772 | @contextlib.contextmanager |
| 7773 | def create(self): |
| 7774 | x = np.arange(0, 50, 10) |
| 7775 | y = np.arange(0, 20, 2) |
| 7776 | data = np.ones((5, 10)) |
| 7777 | ds = xr.Dataset( |
| 7778 | {"test": xr.DataArray(data, dims=("x", "y"), coords={"x": x, "y": y})} |
| 7779 | ) |
| 7780 | with self.create_zarr_target() as target: |
| 7781 | self.save(target, ds) |
| 7782 | yield target, ds |
| 7783 | |
| 7784 | def save(self, target, ds, **kwargs): |
| 7785 | ds.to_zarr(target, **kwargs) |
no test coverage detected