Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
hmaarrfk committed May 5, 2024
1 parent 29d7064 commit f958953
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xarray/core/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def unstack(self) -> tuple[dict[Hashable, Index], pd.MultiIndex]:
raise NotImplementedError()

def create_variables(
self, variables: Mapping[Any, Variable] | None = None
self, variables: Mapping[Any, Variable] | None = None, *, fastpath=False,
) -> IndexVars:
"""Maybe create new coordinate variables from this index.
Expand Down Expand Up @@ -1132,7 +1132,7 @@ def reorder_levels(
return self._replace(index, level_coords_dtype=level_coords_dtype)

def create_variables(
self, variables: Mapping[Any, Variable] | None = None
self, variables: Mapping[Any, Variable] | None = None, *, fastpath=False
) -> IndexVars:
from xarray.core.variable import IndexVariable

Expand Down Expand Up @@ -1787,11 +1787,11 @@ def _apply_indexes_fast(indexes: Indexes[Index], args: Mapping[Any, Any], func:
# which is really slow when repeatidly iterating through
# an array. However, it fails to return the correct ID for
# multi-index arrays
indexes, coords = indexes._indexes, indexes._variables
indexes_fast, coords = indexes._indexes, indexes._variables

new_indexes: dict[Hashable, Index] = {k: v for k, v in indexes.items()}
new_indexes: dict[Hashable, Index] = {k: v for k, v in indexes_fast.items()}
new_index_variables: dict[Hashable, Variable] = {}
for name, index in indexes.items():
for name, index in indexes_fast.items():
coord = coords[name]
if hasattr(coord, "_indexes"):
index_vars = {n: coords[n] for n in coord._indexes}
Expand Down

0 comments on commit f958953

Please sign in to comment.