issues: 490037439
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
490037439 | MDU6SXNzdWU0OTAwMzc0Mzk= | 3282 | Silent value assignment failure in open_zarr Dataset due to hidden mode='r' | 6475152 | open | 0 | 0 | 2019-09-05T22:23:46Z | 2020-03-29T10:33:20Z | NONE | Hello Xarray devs, Thanks for your work on this fantastic package. I'm a new user, and the subtleties of different data stores are unfamiliar to me. I got tripped up by the fact that Zarr stores are (silently) read-only, and I think it would be helpful if this were more prominent in the docstring or zarr section of the docs. When I try to assign values to parts of a local Zarr-backed Dataset, I get a silent failure: ```python In [142]: ds = xr.open_zarr('tmp.zarr', chunks=None) In [143]: selector = dict(time='2014-06-06T01:00:00', azimuth=0, frequency=0.0) In [144]: ds['counts'].loc[selector].values Out[144]: array(4294967295, dtype=uint32) try to assign a value here, like the example in the docs:In [55]: ds['empty'].loc[dict(lon=260, lat=30)] = 100In [145]: ds['counts'].loc[selector].values = 0 just get the same value backIn [146]: ds['counts'].loc[selector].values Out[146]: array(4294967295, dtype=uint32) ``` The answer seems to be buried in the
Expected OutputAssignment that follows the examples in the documentation.
I'm happy to make a PR on 1 & 3, but I'm not familiar with the reasoning behind why stores are never mixed-mode. Thanks again! Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3282/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |