issue_comments: 965861064
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/pull/5961#issuecomment-965861064 | https://api.github.com/repos/pydata/xarray/issues/5961 | 965861064 | IC_kwDOAMm_X845kd7I | 35968931 | 2021-11-11T00:08:44Z | 2021-11-11T00:08:44Z | MEMBER | Question: Does this change to 1) It seems it is possible to alter a ```python In [34]: ds = xr.Dataset({'a': 0}) In [35]: ds.coords['c'] = 2 In [36]: ds Out[36]: <xarray.Dataset> Dimensions: () Coordinates: c int64 2 Data variables: a int64 0 ``` (That's a bit weird given that the docstring of 2) It also seems it is possible to similarly alter a ```python In [30]: da = xr.DataArray(0) In [31]: da.coords['c'] = 1 In [32]: da Out[32]: <xarray.DataArray ()> array(0) Coordinates: c int64 1 ``` 3) However is it meant to be possible to alter a ```python In [37]: ds = xr.Dataset({'a': 0}) In [38]: ds['a'].coords['c'] = 2 In [39]: ds Out[39]: <xarray.Dataset> Dimensions: () Data variables: a int64 0 In [40]: ds['a'] Out[40]: <xarray.DataArray 'a' ()> array(0) In [41]: ds['a'].coords
Out[41]:
Coordinates:
empty
In [43]: coords['c'] = 2 In [44]: coords Out[44]: Coordinates: c int64 2 ``` If altering |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1048697792 |