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/2180#issuecomment-391919607,https://api.github.com/repos/pydata/xarray/issues/2180,391919607,MDEyOklzc3VlQ29tbWVudDM5MTkxOTYwNw==,6815844,2018-05-25T02:06:47Z,2018-05-25T02:19:45Z,MEMBER,"For referene the original issue in #2068 was
```python
In [4]: ds = xr.Dataset()
...: ds.coords['source'] = (['a', 'b', 'c'], np.random.random((2, 3, 4)))
...: ds.coords['unrelated'] = (['a', 'c'], np.random.random((2, 4)))
...: ds
...:
Out[4]:
Dimensions: (a: 2, b: 3, c: 4)
Coordinates:
source (a, b, c) float64 0.4158 0.07152 0.4258 0.4382 0.6616 0.142 ...
unrelated (a, c) float64 0.9318 0.03723 0.4226 0.9472 0.8753 0.7022 ...
Dimensions without coordinates: a, b, c
Data variables:
*empty*
In [5]: ds['dest-2'] = xr.ones_like(ds['source'].isel(c=0))
...: ds
...:
Out[5]:
Dimensions: (a: 2, b: 3)
Coordinates:
source (a, b) float64 0.4158 0.6616 0.1583 0.7821 0.221 0.2555
unrelated (a) float64 0.9318 0.8753
Dimensions without coordinates: a, b
Data variables:
dest-2 (a, b) float64 1.0 1.0 1.0 1.0 1.0 1.0
```
where `ds['unrelated']` drops dimension `c`.
We changed this behavior in #2087, but I think it was a wrong direction.
The previous behavior might be OK as long as `unrelated` is a coordinate variable.
EDIT:
I still feel something strange both in the previous and current behavior of `__setitem__` with coord.
Generally, as @crusaderky has pointed out, the right join will be a better choice.
But In the above example, dropping the dimension of `c` of 'unrelated' looks also awkward.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,326205036
https://github.com/pydata/xarray/issues/2180#issuecomment-391915849,https://api.github.com/repos/pydata/xarray/issues/2180,391915849,MDEyOklzc3VlQ29tbWVudDM5MTkxNTg0OQ==,6815844,2018-05-25T01:41:27Z,2018-05-25T01:41:27Z,MEMBER,"Thanks, @crusaderky.
The first behavior you pointed out is a bug I think.
I raised an issue in #2184, and maybe it should be discussed there.
For the second example,
> I think this should be a right join.
I agree with this.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,326205036
https://github.com/pydata/xarray/issues/2180#issuecomment-391910682,https://api.github.com/repos/pydata/xarray/issues/2180,391910682,MDEyOklzc3VlQ29tbWVudDM5MTkxMDY4Mg==,6815844,2018-05-25T01:05:13Z,2018-05-25T01:30:47Z,MEMBER,"> So maybe we can leave the current behavior as is for now (but remove the warning).
Agreed.
~@shoyer, how do you think about the current `__setitem__` behavior with conflict `dimension coordinate`?
Should it be outer join as @crusaderky pointed out?~
EDIT:
I did not noticed the above comment. I will raise an issue for this.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,326205036
https://github.com/pydata/xarray/issues/2180#issuecomment-391908483,https://api.github.com/repos/pydata/xarray/issues/2180,391908483,MDEyOklzc3VlQ29tbWVudDM5MTkwODQ4Mw==,6815844,2018-05-25T00:48:27Z,2018-05-25T00:48:27Z,MEMBER,"#2087 changed the second behavior.
```python
In [1]: import xarray
...:
...: fridge = xarray.Dataset(
...: data_vars={
...: 'var1': ('fruit', [10]),
...: },
...: coords={
...: 'fruit': ('fruit', [1]),
...: 'quality': ('fruit', ['Red Velvet']),
...: })
...: shopping = xarray.Dataset(
...: data_vars={
...: 'var1': ('fruit', [20]),
...: },
...: coords={
...: 'fruit': ('fruit', [1]),
...: 'quality': ('fruit', ['Tangerine']),
...: })
...:
...: fridge['var1'] = shopping['var1']
...:
```
with v10.3
```python
In [2]: fridge
Out[2]:
Dimensions: (fruit: 1)
Coordinates:
* fruit (fruit) int64 1
quality (fruit)
Dimensions: (fruit: 1)
Coordinates:
* fruit (fruit) int64 1
quality (fruit)