Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 5, 2024
1 parent 11ba965 commit 592e2bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xarray/core/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ def _id_coord_names(self) -> dict[int, tuple[Hashable, ...]]:
if self.__id_coord_names is None:
self._create_id_coord_names()
return self.__id_coord_names

def _create_id_coord_names(self) -> None:
id_coord_names: Mapping[int, list[Hashable]] = defaultdict(list)
for k, v in self._coord_name_id.items():
Expand Down Expand Up @@ -1773,13 +1773,14 @@ def check_variables():

return not not_equal


def _apply_indexes_isel(
indexes: Indexes[Index],
args: Mapping[Any, Any],
):
new_indexes: dict[Hashable, Index] = {k: v for k, v in indexes.items()}
new_index_variables: dict[Hashable, Variable] = {}
# for index, index_vars in indexes.group_by_index():
# for index, index_vars in indexes.group_by_index():
for index in indexes._id_index.values():
# index = indexes._id_index[i]
index_dims = (index.index.name,)
Expand All @@ -1791,7 +1792,8 @@ def _apply_indexes_isel(
new_index_vars = new_index.create_variables(index_vars)
new_index_variables.update(new_index_vars)

return new_indexes, new_index_variables
return new_indexes, new_index_variables


def _apply_indexes(
indexes: Indexes[Index],
Expand Down

0 comments on commit 592e2bd

Please sign in to comment.