home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 828071017

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/5219#issuecomment-828071017 https://api.github.com/repos/pydata/xarray/issues/5219 828071017 MDEyOklzc3VlQ29tbWVudDgyODA3MTAxNw== 1197350 2021-04-28T01:26:34Z 2021-04-28T01:26:34Z MEMBER

we probably would NOT want to use safe_chunks=False, correct?

correct

The problem in this issue is that the dataset is carrying around its original chunks in .encoding and then xarray tries to use these values to set the chunk encoding on the second write op. The solution is to manually delete the chunk encoding from all your data variables. Something like python for var in ds: del ds[var].encoding['chunks']

Originally part of #5056 was a change that would have xarray automatically do this deletion after some operations (such as calling .chunk()); however, we could not reach a consensus on the best way to implement that change. Your example is interesting because it is a slightly different scenario -- calling sel() instead of chunk() -- but the root cause appears to be the same: encoding['chunks'] is being kept around too conservatively.

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