home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1059378287

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/6069#issuecomment-1059378287 https://api.github.com/repos/pydata/xarray/issues/6069 1059378287 IC_kwDOAMm_X84_JNRv 6574622 2022-03-04T17:39:24Z 2022-03-04T17:39:24Z CONTRIBUTOR

I've made a simpler example of the _FillValue - append issue: python import numpy as np import xarray as xr ds = xr.Dataset({"a": ("x", [3.], {"_FillValue": np.nan})}) m = {} ds.to_zarr(m) ds.to_zarr(m, append_dim="x") raises ValueError: failed to prevent overwriting existing key _FillValue in attrs. This is probably an encoding field used by xarray to describe how a variable is serialized. To proceed, remove this key from the variable's attributes manually. I'd expect this to just work (effectively concatenating the dataset to itself).

The workaround: python m = {} ds.to_zarr(m) del ds.a.attrs["_FillValue"] ds.to_zarr(m, append_dim="x") does the trick, but doesn't look right.

@dcherian, @Boorhin should we make a new (CF-related) issue out of this and try to keep focussing on append and region use-cases here, which seemed to be the initial problem in this thread (probably by going further through your example @Boorhin?).

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