home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1648260939

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
1648260939 I_kwDOAMm_X85iPndL 7702 Allow passing coordinates in `to_zarr(region=...)` rather than passing indexes 39069044 closed 0     3 2023-03-30T20:23:00Z 2023-11-14T18:34:51Z 2023-11-14T18:34:51Z CONTRIBUTOR      

Is your feature request related to a problem?

If I want to write to a region of data in a zarr, I usually have some boilerplate code like this: python ds_existing = xr.open_zarr(path) ds_new = xr.Dataset(...) # come up with some new data for a subset region of the existing zarr start_idx = (ds_existing.time == ds_new.time[0]).argmax() end_idx = (ds_existing.time == ds_new.time[-1]).argmax() ds_new.to_zarr(path, region={"time": slice(start_idx, end_idx})

Describe the solution you'd like

It would be nice to automate this within to_zarr, because having to drop into index-space always feels un-xarray-like to me.

There may be pitfalls I'm not thinking of, and I don't know exactly what the API would look like. python ds_new.to_zarr(path, region={"time": "auto"}) # ???

Describe alternatives you've considered

No response

Additional context

No response

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7702/reactions",
    "total_count": 7,
    "+1": 7,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 0 rows from issue in issue_comments
Powered by Datasette · Queries took 0.718ms · About: xarray-datasette