issues: 2098659703
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2098659703 | I_kwDOAMm_X859FwF3 | 8659 | renaming index variables with `rename_vars` seems buggy | 2448579 | closed | 0 | 1 | 2024-01-24T16:35:18Z | 2024-03-15T19:21:51Z | 2024-03-15T19:21:51Z | MEMBER | What happened?(xref #8658) I'm not sure what the expected behaviour is here: ```python import xarray as xr import numpy as np from xarray.testing import _assert_internal_invariants ds = xr.Dataset() ds.coords["1"] = ("1", np.array([1], dtype=np.uint32)) ds["1_"] = ("1", np.array([1], dtype=np.uint32)) ds = ds.rename_vars({"1": "0"}) ds ``` It looks like this sequence of operations creates a default index
But then ```python from xarray.testing import _assert_internal_invariants _assert_internal_invariants(ds, check_default_indexes=True)
AssertionError: ({'0'}, set()) ``` |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/8659/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |