home / github / pull_requests

Menu
  • Search all tables
  • GraphQL API

pull_requests: 1802660917

This data as json

id node_id number state locked title user body created_at updated_at closed_at merged_at merge_commit_sha assignee milestone draft head base author_association auto_merge repo url merged_by
1802660917 PR_kwDOAMm_X85rcmw1 8904 open 0 Handle extra indexes for zarr region writes 39069044 <!-- Feel free to remove check-list items aren't relevant to your change --> - [x] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` 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 `set` logic. I thought #8877 might have already done this, but not quite. By just reordering the point at which we drop indices, we can now skip this. We still raise if data vars are passed that don't overlap with the region. cc @dcherian 2024-04-02T14:34:00Z 2024-04-03T19:20:37Z     b2cc98ae16419e7b600d62ecfd6c616c4a6c028c     0 523f18ea66be2058a8d22c5a43e3fbac47f8afcc 97d3a3aaa071fa5341132331abe90ec39f914b52 CONTRIBUTOR   13221727 https://github.com/pydata/xarray/pull/8904  

Links from other tables

  • 0 rows from pull_requests_id in labels_pull_requests
Powered by Datasette · Queries took 0.833ms