issues: 2220689594
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2220689594 | PR_kwDOAMm_X85rcmw1 | 8904 | Handle extra indexes for zarr region writes | 39069044 | open | 0 | 8 | 2024-04-02T14:34:00Z | 2024-04-03T19:20:37Z | CONTRIBUTOR | 0 | pydata/xarray/pulls/8904 |
Small follow up to #8877. If we're going to drop the indices anyways for region writes, we may as well not raise if they are still in the dataset. This makes the user experience of region writes simpler: ```python ds = xr.tutorial.open_dataset("air_temperature") ds.to_zarr("test.zarr") region = {"time": slice(0, 10)} This fails unless we remember to ds.drop_vars(["lat", "lon"])ds.isel(**region).to_zarr("test.zarr", region=region) ``` I find this annoying because I often have a dataset with a bunch of unrelated indexes and have to remember which ones to drop, or use some verbose cc @dcherian |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8904/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | pull |