Skip to content

Commit

Permalink
Update _utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Sep 21, 2024
1 parent 93933d6 commit de0aa20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray/namedarray/_array_api/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,10 @@ def _dims_from_tuple_indexing(dims: _Dims, key: _IndexKeys) -> _Dims:
"""
_dims = list(dims)
j = 0
for i, v in enumerate(key):
if v is None:
for k in key:
if k is None:
_dims.insert(j, _new_unique_dim_name(tuple(_dims)))
elif isinstance(v, int):
elif isinstance(k, int):
_dims.pop(j)
j -= 1
j += 1
Expand Down

0 comments on commit de0aa20

Please sign in to comment.