home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1366882900

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/7403#issuecomment-1366882900 https://api.github.com/repos/pydata/xarray/issues/7403 1366882900 IC_kwDOAMm_X85RePpU 39069044 2022-12-28T19:53:05Z 2022-12-28T19:53:05Z CONTRIBUTOR

Your MCVE has mode="a", is that intentional? As far as defaults, what the docstring says is:

The default mode is “a” if append_dim is set. Otherwise, it is “r+” if region is set and w- otherwise.

So without specifying mode, you get mode="w-" which will not overwrite anything. With mode="a", your MCVE runs fine for me.

From using these a bit, my understanding is:

  • mode="w-" is the safe default that won't overwrite anything
  • mode="w" is only if you want to rewrite the entire zarr store, not for rewriting a subset of existing data
  • mode="r+" is for modifying values on some subset of the existing store specified by the index with region, but doesn't allow changing any dimension sizes
  • mode="a" is for completely overwriting existing variables*, appending new variables, or appending data along an existing dimension, paired with append_dim

* I actually didn't realize this behavior until testing it out just now, but it is described in the docstring

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 1
}
  1512290017
Powered by Datasette · Queries took 82.196ms · About: xarray-datasette