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/3862#issuecomment-612145002,https://api.github.com/repos/pydata/xarray/issues/3862,612145002,MDEyOklzc3VlQ29tbWVudDYxMjE0NTAwMg==,1217238,2020-04-10T17:56:04Z,2020-04-10T17:59:44Z,MEMBER,"> In light of [#3470 (comment)](https://github.com/pydata/xarray/issues/3470#issuecomment-566214653) it seems like the next best thing would be to given `assign_coords` the optional ability to update the `DataArray`/`DataSet` in-place. Thoughts?
There's no need to use `assign_coords`. You can also just use normal assignment to a DataArray/Dataset or `coords`, e.g,
```python
ds['time'] = new_values # good
ds.coords['time'] = new_values # good
ds.coords['time'].values = new_values # broken, disabled by this PR
ds.coords['time'].values[:] = new_values # also buggy (but harder to disable)
```
This would probably be worth clarifying in the error message.
(Under the hood, `assign_coords` basically does the exactly same thing as assignment to `coords`, it just copies the `Dataset`/DataArray` first)","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-612146195,https://api.github.com/repos/pydata/xarray/issues/3862,612146195,MDEyOklzc3VlQ29tbWVudDYxMjE0NjE5NQ==,29104956,2020-04-10T17:58:50Z,2020-04-10T17:58:50Z,NONE,Ah! Nice! Yeah the error message led me to believe that there was no path for in-place updates.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-612141362,https://api.github.com/repos/pydata/xarray/issues/3862,612141362,MDEyOklzc3VlQ29tbWVudDYxMjE0MTM2Mg==,29104956,2020-04-10T17:47:14Z,2020-04-10T17:47:14Z,NONE,"> That's exactly what this change does, making assignment to IndexVariable.values an error.
Sorry, I got a bit criss-crossed between this PR and the thread in #3470.
In light of https://github.com/pydata/xarray/issues/3470#issuecomment-566214653 it seems like the next best thing would be to given `assign_coords` the optional ability to update the `DataArray`/`DataSet` in-place. Thoughts? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-612132737,https://api.github.com/repos/pydata/xarray/issues/3862,612132737,MDEyOklzc3VlQ29tbWVudDYxMjEzMjczNw==,1217238,2020-04-10T17:26:40Z,2020-04-10T17:26:40Z,MEMBER,"> is there a reason why this change wasn't incorporated into `values.setter`?
I'm not quite sure what you mean here. That's exactly what this change does, making assignment to `IndexVariable.values` an error.
If you were mutating `.values` on an indexed variable, then you already had a likely bug, because only part of xarray's data structures were being updated (the Variable, but not indexes). That's why we put this in as a bug fix -- see the linked issue https://github.com/pydata/xarray/issues/3470 for examples.
Unfortunately we couldn't figure out another way to make this work -- see https://github.com/pydata/xarray/issues/3470#issuecomment-566214653 for discussion. We're definitely open to alternatives if you can come up with them, though!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-612095122,https://api.github.com/repos/pydata/xarray/issues/3862,612095122,MDEyOklzc3VlQ29tbWVudDYxMjA5NTEyMg==,29104956,2020-04-10T15:59:41Z,2020-04-10T15:59:41Z,NONE,@dcherian @max-sixty is there a reason why this change wasn't incorporated into `values.setter`? This change blocks the ability to update coordinate values in-place. This breaks code in a more fundamental way than just requiring users to rely on `assign_coords` - it can necessitate a substantial change in code design for people who were relying on the ability to mutate coordinates. This also leads me to ask: was it really appropriate to call such a substantial breaking change only a patch? ,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-602596404,https://api.github.com/repos/pydata/xarray/issues/3862,602596404,MDEyOklzc3VlQ29tbWVudDYwMjU5NjQwNA==,2448579,2020-03-23T13:42:44Z,2020-03-23T13:42:44Z,MEMBER,"Great. Thanks all.
Now to find out how many downstream projects test against master on CI :)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-602299713,https://api.github.com/repos/pydata/xarray/issues/3862,602299713,MDEyOklzc3VlQ29tbWVudDYwMjI5OTcxMw==,6628425,2020-03-22T23:47:45Z,2020-03-22T23:47:45Z,MEMBER,"I think now that you merged #3874, if you re-merge master they should pass.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-602291813,https://api.github.com/repos/pydata/xarray/issues/3862,602291813,MDEyOklzc3VlQ29tbWVudDYwMjI5MTgxMw==,2448579,2020-03-22T23:14:03Z,2020-03-22T23:14:03Z,MEMBER,"I think the failed tests are unrelated since they only fail on the `upstream-dev`
```
FAILED xarray/tests/test_cftimeindex.py::test_indexing_in_series_getitem[365_day]
FAILED xarray/tests/test_cftimeindex.py::test_indexing_in_series_getitem[360_day]
FAILED xarray/tests/test_cftimeindex.py::test_indexing_in_series_getitem[julian]
FAILED xarray/tests/test_cftimeindex.py::test_indexing_in_series_getitem[all_leap]
FAILED xarray/tests/test_cftimeindex.py::test_indexing_in_series_getitem[366_day]
FAILED xarray/tests/test_cftimeindex.py::test_indexing_in_series_getitem[gregorian]
FAILED xarray/tests/test_cftimeindex.py::test_indexing_in_series_getitem[proleptic_gregorian]
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-602250092,https://api.github.com/repos/pydata/xarray/issues/3862,602250092,MDEyOklzc3VlQ29tbWVudDYwMjI1MDA5Mg==,14808389,2020-03-22T18:17:09Z,2020-03-22T18:17:09Z,MEMBER,this causes the docs to fail: https://github.com/pydata/xarray/blob/0722b424b547a362b5f4678483d0a42812d611ee/doc/plotting.rst#L660,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-602088059,https://api.github.com/repos/pydata/xarray/issues/3862,602088059,MDEyOklzc3VlQ29tbWVudDYwMjA4ODA1OQ==,2448579,2020-03-21T19:02:04Z,2020-03-21T19:02:04Z,MEMBER,I think @shoyer should confirm that this is what we want to do,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-602080002,https://api.github.com/repos/pydata/xarray/issues/3862,602080002,MDEyOklzc3VlQ29tbWVudDYwMjA4MDAwMg==,5635139,2020-03-21T17:59:13Z,2020-03-21T17:59:13Z,MEMBER,OK to merge @dcherian ? We can almost release 0.15.1 then,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100
https://github.com/pydata/xarray/pull/3862#issuecomment-600127485,https://api.github.com/repos/pydata/xarray/issues/3862,600127485,MDEyOklzc3VlQ29tbWVudDYwMDEyNzQ4NQ==,5635139,2020-03-17T15:16:32Z,2020-03-17T15:16:32Z,MEMBER,"Great, good spot @dcherian ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,582708100