Skip to content

Commit

Permalink
fix in namedarray
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Dec 12, 2023
1 parent 6231ae2 commit 48caa38
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xarray/namedarray/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,14 @@ def _dask_finalize(
data = array_func(results, *args, **kwargs)
return type(self)(self._dims, data, attrs=self._attrs)

@overload
def get_axis_num(self, dim: Iterable[Hashable]) -> tuple[int, ...]:
...

@overload
def get_axis_num(self, dim: Hashable) -> int:
...

def get_axis_num(self, dim: Hashable | Iterable[Hashable]) -> int | tuple[int, ...]:
"""Return axis number(s) corresponding to dimension(s) in this array.
Expand Down

0 comments on commit 48caa38

Please sign in to comment.