issue_comments: 225330535
This data as json
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/802#issuecomment-225330535 | https://api.github.com/repos/pydata/xarray/issues/802 | 225330535 | MDEyOklzc3VlQ29tbWVudDIyNTMzMDUzNQ== | 1217238 | 2016-06-11T01:57:10Z | 2016-06-11T01:57:10Z | MEMBER | I did a little bit of testing. Here is one case I found where things don't work as I expected: ``` In [32]: idx = pd.MultiIndex.from_product([['a', 'b'], [0, 1, 2]], names=['lev0', 'lev1']) In [33]: data = xr.DataArray(range(6), [('x', idx)]) In [34]: data.sel(x=('a',)) Out[34]: <xarray.DataArray (lev1: 3)> array([0, 1, 2]) Coordinates: * lev1 (lev1) int64 0 1 2 In [35]: data.sel(x='a') Out[35]: <xarray.DataArray (x: 3)> array([0, 1, 2]) Coordinates: * x (x) object ('a', 0) ('a', 1) ('a', 2) ``` I would expect an index drop in the last case, too. I guess we need to check for scalars. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
143264649 |