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/7004#issuecomment-1255524719,https://api.github.com/repos/pydata/xarray/issues/7004,1255524719,IC_kwDOAMm_X85K1clv,10194086,2022-09-22T20:38:40Z,2022-09-22T20:38:40Z,MEMBER,"It would be nice to be able to preserve the MultiIndex with sel (e.g. `ds.sel(one=[""a""]`) but if it makes the behavior inconsistent it is no good either...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1364798843 https://github.com/pydata/xarray/pull/7004#issuecomment-1240463387,https://api.github.com/repos/pydata/xarray/issues/7004,1240463387,IC_kwDOAMm_X85J7_gb,4160723,2022-09-08T09:28:25Z,2022-09-08T09:28:25Z,MEMBER,"> it is now allowed to provide array-like labels. Hmm not sure if it's a good idea... I find `get_locs()` a bit confusing like in the example below where a 4-labels array for level ""one"" returns a 3-items location integer array: ```python # is the 3rd label (""b"") ignored? midx.get_locs((np.array([""b"", ""a"", ""b"", ""c""]), 0)) # array([4, 0, 8]) ``` That differs too much from the vectorized selection based on single pandas indexes... Fancy indexing with n-d label arrays doesn't work either: ```python midx.get_locs((np.array([[""a"", ""a""], [""a"", ""a""]]), 0)) # InvalidIndexError: [['a' 'a'] # ['a' 'a']] ``` And providing `Variable` or `DataArray` objects as labels would make things event harder, unless we ignore their dimension names and coordinates (but then it wouldn't be consistent with vectorized selection based on single pandas indexes). Probably not worth it then? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1364798843