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
https://github.com/pydata/xarray/issues/2056#issuecomment-381278786,https://api.github.com/repos/pydata/xarray/issues/2056,381278786,MDEyOklzc3VlQ29tbWVudDM4MTI3ODc4Ng==,1217238,2018-04-13T22:50:56Z,2018-04-13T22:50:56Z,MEMBER,"Hmm. This warning message is slightly unfortunate indeed.
> Currently we retain the coords, but discard attrs. That seems arbitrary?
Agreed!
> I don't have a strong view. If you think that Foo(foo) should always return foo (which is often the case in pandas), then we should retain the full object.
Yes, we could defensibly go either way here.
Generally, I don't think this is an important invariant, and it certainly doesn't make sense for every type. But maybe it does make sense for `Dataset`, given that we do do so for `DataArray`:
https://github.com/pydata/xarray/blob/a9d1f3a36229636f0d519eb36a8d4a7c91f6e1cd/xarray/core/dataarray.py#L205-L223
(But to be clear, this wasn't a terribly careful design decision for DataArray, either.)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,314241348