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/issues/2056#issuecomment-436666893,https://api.github.com/repos/pydata/xarray/issues/2056,436666893,MDEyOklzc3VlQ29tbWVudDQzNjY2Njg5Mw==,5635139,2018-11-07T15:40:49Z,2018-11-07T15:40:49Z,MEMBER,Closing with 0.11 release,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,314241348
https://github.com/pydata/xarray/issues/2056#issuecomment-383210788,https://api.github.com/repos/pydata/xarray/issues/2056,383210788,MDEyOklzc3VlQ29tbWVudDM4MzIxMDc4OA==,5635139,2018-04-20T20:18:20Z,2018-04-20T20:18:20Z,MEMBER,"I'm happy to add this in.
A proposal, without a strong view:
- When a dataset is supplied, a shallow copy of that dataset is returned
- We raise if `coords` or `attrs` are passed. If you want those replaced, you can pass `data_vars` into the constructor. Otherwise I'm not sure how we'd have explicit behavior
- We could add coords if they're not already there, but we'd need to either raise or silently replace if they were, which creates surprises
- We could take the data_vars and attempt alignment, but if that's the desired behavior, you can pass the `.data_vars`
We could use this to take a decision on `DataArray` too. At the moment, coords are silently replaced:
```
xr.DataArray(xr.DataArray([1], coords={'a':[2222]}, dims=['a']), coords={'a':[2]}, dims=['a'])
array([1])
Coordinates:
* a (a) int64 2
```
I would suggest the same as above - people can pass `.variable` if they want to be able to pass coords.
I'm sure there's cases I haven't thought about - let me know any thoughts. CC @pydata/xarray
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,314241348