issues: 545762025
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
545762025 | MDU6SXNzdWU1NDU3NjIwMjU= | 3664 | Regression 0.14.0 -> 0.14.1: __setattr__ no longer updates matching index | 13662783 | closed | 0 | 2 | 2020-01-06T14:42:50Z | 2020-01-06T16:03:16Z | 2020-01-06T15:37:17Z | CONTRIBUTOR | MCVE Code SampleThis came up in the following (simplified) case: ```python import numpy as np import xarray as xr x = [1, 2, 3, 4] data = [1., 2., 3. , 4.] dims = ["x"] coords = {"x": x} da = xr.DataArray(data, coords, dims) da1 = da.sel(x=[1, 3]) da2 = da.sel(x=[2, 4]) da2["x"].values = da1["x"].values da3 = da2 - da1 print(da3) ``` In 0.14.1, this results in an empty DataArray 0.14.0 (and before), no issues:
Interestingly, the values of However, the index has not been updated, Expected OutputI'm expecting output as in 0.14.0 and before. I've briefly stepped through the code for Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3664/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |