issues: 1174177534
This data as json
| id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1174177534 | I_kwDOAMm_X85F_Ib- | 6381 | vectorized indexing with DataArray should not preserve IndexVariable | 2448579 | closed | 0 | 1 | 2022-03-19T05:08:39Z | 2022-03-21T04:47:47Z | 2022-03-21T04:47:47Z | MEMBER | What happened?After vectorized indexing a DataArray with dim What did you expect to happen?
Minimal Complete Verifiable Example```python import xarray as xr xr.set_options(display_style="text") da = xr.DataArray([1, 2, 3], dims="x", coords={"x": [0, 1, 2]}) idxr = xr.DataArray([1], dims="z", name="x", coords={"z": ("z", ["a"])}) da.sel(x=idxr) ```
Relevant log outputNo response Anything else we need to know?No response Environmentxarray main but this bug was present prior to the explicit indexes refactor. |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/6381/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |