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/5732#issuecomment-904684430,https://api.github.com/repos/pydata/xarray/issues/5732,904684430,IC_kwDOAMm_X8417GOO,2448579,2021-08-24T14:18:08Z,2021-08-24T14:18:08Z,MEMBER,"> the DataArray concept as a single array-like vs. a collection of data + coordinates.
Yeah non-dim coordinates essentially make DataArrays a Dataset with one special variable =)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,977149831
https://github.com/pydata/xarray/issues/5732#issuecomment-904446262,https://api.github.com/repos/pydata/xarray/issues/5732,904446262,IC_kwDOAMm_X8416ME2,4160723,2021-08-24T08:43:07Z,2021-08-24T12:11:28Z,MEMBER,"I think a similar concern applies to `.update`. I find it surprising in the first place that a single mapping item (""foo"") results in multiple mapping items (""foo"", ""x"") in the returned xarray object.
That said, I agree that taking into account the (indexed) coordinates of the DataArray are important for alignment. The example below makes perfect sense:
```python
>>> foo = xr.DataArray([1.0, 2.0, 3.0], coords={""x"": [0, 1, 2]}, dims=""x"")
>>> ds = xr.Dataset(coords={""x"": [2, 3, 4, 5]})
>>> ds.update({""foo"": foo})
Dimensions: (x: 4)
Coordinates:
* x (x) int64 2 3 4 5
Data variables:
foo (x) float64 3.0 nan nan nan
```
I guess my concern is related to the (my?) slightly ambiguous view of the DataArray concept as a *single array-like* vs. a *collection* of data + coordinates.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,977149831
https://github.com/pydata/xarray/issues/5732#issuecomment-903947157,https://api.github.com/repos/pydata/xarray/issues/5732,903947157,IC_kwDOAMm_X8414SOV,2448579,2021-08-23T16:56:37Z,2021-08-23T16:57:30Z,MEMBER,"I have definitely relied on this before, I imagine its a pretty common pattern too but I could be wrong.
Note that automatically adding the index satisfies this condition which seems sensible to me
```
ds.foo.identical(foo)
```
EDIT: would a similar concern apply to
```
ds.update({""foo"": foo})
```
or is your concern specifically for coords vs data_vars?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,977149831