@@ -829,6 +829,7 @@ _CharacterItemT_co = TypeVar("_CharacterItemT_co", bound=_CharLike_co, default=_
829
829
_TD64ItemT_co = TypeVar ("_TD64ItemT_co" , bound = dt .timedelta | int | None , default = dt .timedelta | int | None , covariant = True )
830
830
_DT64ItemT_co = TypeVar ("_DT64ItemT_co" , bound = dt .date | int | None , default = dt .date | int | None , covariant = True )
831
831
_TD64UnitT = TypeVar ("_TD64UnitT" , bound = _TD64Unit , default = _TD64Unit )
832
+ _BoolOrIntArrayT = TypeVar ("_BoolOrIntArrayT" , bound = NDArray [np .integer | np .bool ])
832
833
833
834
### Type Aliases (for internal use only)
834
835
@@ -1707,18 +1708,18 @@ class _ArrayOrScalarCommon:
1707
1708
@overload # axis=index, out=None (default)
1708
1709
def argmax (self , / , axis : SupportsIndex , out : None = None , * , keepdims : builtins .bool = False ) -> Any : ...
1709
1710
@overload # axis=index, out=ndarray
1710
- def argmax (self , / , axis : SupportsIndex | None , out : _ArrayT , * , keepdims : builtins .bool = False ) -> _ArrayT : ...
1711
+ def argmax (self , / , axis : SupportsIndex | None , out : _BoolOrIntArrayT , * , keepdims : builtins .bool = False ) -> _BoolOrIntArrayT : ...
1711
1712
@overload
1712
- def argmax (self , / , axis : SupportsIndex | None = None , * , out : _ArrayT , keepdims : builtins .bool = False ) -> _ArrayT : ...
1713
+ def argmax (self , / , axis : SupportsIndex | None = None , * , out : _BoolOrIntArrayT , keepdims : builtins .bool = False ) -> _BoolOrIntArrayT : ...
1713
1714
1714
1715
@overload # axis=None (default), out=None (default), keepdims=False (default)
1715
1716
def argmin (self , / , axis : None = None , out : None = None , * , keepdims : L [False ] = False ) -> intp : ...
1716
1717
@overload # axis=index, out=None (default)
1717
1718
def argmin (self , / , axis : SupportsIndex , out : None = None , * , keepdims : builtins .bool = False ) -> Any : ...
1718
1719
@overload # axis=index, out=ndarray
1719
- def argmin (self , / , axis : SupportsIndex | None , out : _ArrayT , * , keepdims : builtins .bool = False ) -> _ArrayT : ...
1720
+ def argmin (self , / , axis : SupportsIndex | None , out : _BoolOrIntArrayT , * , keepdims : builtins .bool = False ) -> _BoolOrIntArrayT : ...
1720
1721
@overload
1721
- def argmin (self , / , axis : SupportsIndex | None = None , * , out : _ArrayT , keepdims : builtins .bool = False ) -> _ArrayT : ...
1722
+ def argmin (self , / , axis : SupportsIndex | None = None , * , out : _BoolOrIntArrayT , keepdims : builtins .bool = False ) -> _BoolOrIntArrayT : ...
1722
1723
1723
1724
@overload # out=None (default)
1724
1725
def round (self , / , decimals : SupportsIndex = 0 , out : None = None ) -> Self : ...
@@ -5363,14 +5364,14 @@ class matrix(ndarray[_2DShapeT_co, _DTypeT_co]):
5363
5364
@overload
5364
5365
def argmax (self , axis : _ShapeLike , out : None = ...) -> matrix [_2D , dtype [intp ]]: ...
5365
5366
@overload
5366
- def argmax (self , axis : _ShapeLike | None = ..., out : _ArrayT = ...) -> _ArrayT : ...
5367
+ def argmax (self , axis : _ShapeLike | None = ..., out : _BoolOrIntArrayT = ...) -> _BoolOrIntArrayT : ...
5367
5368
5368
5369
@overload
5369
5370
def argmin (self : NDArray [_ScalarT ], axis : None = ..., out : None = ...) -> intp : ...
5370
5371
@overload
5371
5372
def argmin (self , axis : _ShapeLike , out : None = ...) -> matrix [_2D , dtype [intp ]]: ...
5372
5373
@overload
5373
- def argmin (self , axis : _ShapeLike | None = ..., out : _ArrayT = ...) -> _ArrayT : ...
5374
+ def argmin (self , axis : _ShapeLike | None = ..., out : _BoolOrIntArrayT = ...) -> _BoolOrIntArrayT : ...
5374
5375
5375
5376
@overload
5376
5377
def ptp (self : NDArray [_ScalarT ], axis : None = ..., out : None = ...) -> _ScalarT : ...
0 commit comments