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/pull/4979#issuecomment-789599056,https://api.github.com/repos/pydata/xarray/issues/4979,789599056,MDEyOklzc3VlQ29tbWVudDc4OTU5OTA1Ng==,10194086,2021-03-03T10:11:43Z,2021-03-03T10:11:43Z,MEMBER,"One thing I did not see discussed is alignment (or did I miss this?). Currently alignment is based on the ""indexes"" or well I guess `pd.Index(dimension-coords)`. I assume not all potential indexes are useful for this? Alignment will still be based on 1D dimension-coords? One (potential) edge case are `MultiIndex` which allow to align several non-dimension coordinates.
```python import xarray as xr da1 = xr.DataArray([1, 2, 3], dims=""x"", coords=dict(time=(""x"", [1, 2, 3]), exp=(""x"", [""a"", ""a"", ""b""]))) da2 = xr.DataArray([2, 3, 4], dims=""x"", coords=dict(time=(""x"", [1, 2, 3]), exp=(""x"", [""a"", ""a"", ""a""]))) da1 = da1.set_index(x=(""time"", ""exp"")) da2 = da2.set_index(x=(""time"", ""exp"")) da1 + da2 ``` ```python array([3, 5]) Coordinates: * x (x) MultiIndex - time (x) int64 1 2 - exp (x) object 'a' 'a' ```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,819062172