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/3731#issuecomment-580662115,https://api.github.com/repos/pydata/xarray/issues/3731,580662115,MDEyOklzc3VlQ29tbWVudDU4MDY2MjExNQ==,35968931,2020-01-31T09:45:52Z,2020-01-31T09:46:44Z,MEMBER,"> Why not allow multiple dimensions with the same name? They can be disambiguated with positional indexing for when it matters. I'm not sure it's that simple... What would you suggest the behaviour for `da.isel(dim='ambiguous_dim')` or `da.mean(dim='ambiguous_dim')` be?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,557257598 https://github.com/pydata/xarray/issues/3731#issuecomment-580289880,https://api.github.com/repos/pydata/xarray/issues/3731,580289880,MDEyOklzc3VlQ29tbWVudDU4MDI4OTg4MA==,35968931,2020-01-30T14:52:27Z,2020-01-30T14:52:27Z,MEMBER,"Thanks for this @ivirshup , I'm surprised at this too. The problem seems to be that the DataArray you've managed to create breaks xarray's own data model! There should be one dim for each axis of the wrapped array, but ```python import xarray as xr import numpy as np sample_idx = xr.IndexVariable(""sample_id"", [""a"", ""b"", ""c""]) da = xr.DataArray(np.eye(3), coords=(sample_idx, sample_idx) print(da) ``` gives a dataarray object which somehow has only one dim while wrapping a 2D array! ``` array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]) Coordinates: * sample_id (sample_id) array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]) Coordinates: * dim0 (dim0) array([0., 1., 0.]) Coordinates: * dim0 (dim0)