File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,14 @@ def __iter__(self: Any) -> Iterator[Any]:
199
199
raise TypeError ("iteration over a 0-d array" )
200
200
return self ._iter ()
201
201
202
+ @overload
203
+ def get_axis_num (self , dim : Iterable [Hashable ]) -> tuple [int , ...]:
204
+ ...
205
+
206
+ @overload
207
+ def get_axis_num (self , dim : Hashable ) -> int :
208
+ ...
209
+
202
210
def get_axis_num (self , dim : Hashable | Iterable [Hashable ]) -> int | tuple [int , ...]:
203
211
"""Return axis number(s) corresponding to dimension(s) in this array.
204
212
Original file line number Diff line number Diff line change @@ -648,6 +648,14 @@ def _dask_finalize(
648
648
data = array_func (results , * args , ** kwargs )
649
649
return type (self )(self ._dims , data , attrs = self ._attrs )
650
650
651
+ @overload
652
+ def get_axis_num (self , dim : Iterable [Hashable ]) -> tuple [int , ...]:
653
+ ...
654
+
655
+ @overload
656
+ def get_axis_num (self , dim : Hashable ) -> int :
657
+ ...
658
+
651
659
def get_axis_num (self , dim : Hashable | Iterable [Hashable ]) -> int | tuple [int , ...]:
652
660
"""Return axis number(s) corresponding to dimension(s) in this array.
653
661
You can’t perform that action at this time.
0 commit comments