@@ -5,7 +5,8 @@ from typing_extensions import Never, Self, TypeVar, deprecated, overload, overri
5
5
import numpy as np
6
6
from _numtype import Array , ToGeneric_0d , ToGeneric_1nd , ToGeneric_nd
7
7
from numpy import _OrderACF , _OrderKACF , amax , amin , bool_ , expand_dims # noqa: ICN003
8
- from numpy ._typing import _BoolCodes
8
+ from numpy ._globals import _NoValueType
9
+ from numpy ._typing import ArrayLike , _ArrayLike , _BoolCodes , _ScalarLike_co , _ShapeLike
9
10
10
11
__all__ = [
11
12
"MAError" ,
@@ -195,6 +196,8 @@ _DTypeT = TypeVar("_DTypeT", bound=np.dtype)
195
196
_DTypeT_co = TypeVar ("_DTypeT_co" , bound = np .dtype , default = np .dtype , covariant = True )
196
197
197
198
_DTypeLikeBool : TypeAlias = type [bool | np .bool ] | np .dtype [np .bool ] | _BoolCodes
199
+ _ArrayType = TypeVar ("_ArrayType" , bound = np .ndarray [Any , Any ])
200
+ _SCT = TypeVar ("_SCT" , bound = np .generic )
198
201
199
202
###
200
203
@@ -824,13 +827,39 @@ def array(
824
827
) -> Incomplete : ...
825
828
826
829
#
830
+ @overload
827
831
def min (
828
- obj : Incomplete ,
829
- axis : Incomplete = ...,
830
- out : Incomplete = ...,
831
- fill_value : Incomplete = ...,
832
- keepdims : Incomplete = ...,
833
- ) -> Incomplete : ...
832
+ obj : _ArrayLike [_SCT ],
833
+ axis : None = None ,
834
+ out : None = None ,
835
+ fill_value : _ScalarLike_co | None = None ,
836
+ keepdims : L [False ] | _NoValueType = ...,
837
+ ) -> _SCT : ...
838
+ @overload
839
+ def min (
840
+ obj : ArrayLike ,
841
+ axis : _ShapeLike | None = None ,
842
+ out : None = None ,
843
+ fill_value : _ScalarLike_co | None = None ,
844
+ keepdims : bool | _NoValueType = ...,
845
+ ) -> Any : ...
846
+ @overload
847
+ def min (
848
+ obj : ArrayLike ,
849
+ axis : None ,
850
+ out : _ArrayType ,
851
+ fill_value : _ScalarLike_co | None = None ,
852
+ keepdims : bool | _NoValueType = ...,
853
+ ) -> _ArrayType : ...
854
+ @overload
855
+ def min (
856
+ obj : ArrayLike ,
857
+ axis : _ShapeLike | None = None ,
858
+ * ,
859
+ out : _ArrayType ,
860
+ fill_value : _ScalarLike_co | None = None ,
861
+ keepdims : bool | _NoValueType = ...,
862
+ ) -> _ArrayType : ...
834
863
def max (
835
864
obj : Incomplete ,
836
865
axis : Incomplete = ...,
0 commit comments