issues: 318237397
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
318237397 | MDExOlB1bGxSZXF1ZXN0MTg0NDk1MDI4 | 2087 | Drop conflicted coordinate when assignment. | 6815844 | closed | 0 | 1 | 2018-04-27T00:12:43Z | 2018-05-02T05:58:41Z | 2018-05-02T02:31:02Z | MEMBER | 0 | pydata/xarray/pulls/2087 |
After this, when assigning a dataarray to a dataset, non-dimensional and conflicted coordinates of the dataarray are dropped. example ``` In [2]: ds = xr.Dataset({'da': ('x', [0, 1, 2])}, ...: coords={'y': (('x',), [0.1, 0.2, 0.3])}) ...: ds ...: Out[2]: <xarray.Dataset> Dimensions: (x: 3) Coordinates: y (x) float64 0.1 0.2 0.3 Dimensions without coordinates: x Data variables: da (x) int64 0 1 2 In [3]: other = ds['da'] ...: other['y'] = 'x', [0, 1, 2] # conflicted non-dimensional coordinate ...: ds['da'] = other ...: ds ...: Out[3]: <xarray.Dataset> Dimensions: (x: 3) Coordinates: y (x) float64 0.1 0.2 0.3 # 'y' is not overwritten Dimensions without coordinates: x Data variables: da (x) int64 0 1 2 ``` |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2087/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | pull |