@@ -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" ,
@@ -188,7 +189,9 @@ __all__ = [
188
189
"zeros_like" ,
189
190
]
190
191
192
+ _ArrayT = TypeVar ("_ArrayT" , bound = np .ndarray [Any , Any ])
191
193
_UFuncT_co = TypeVar ("_UFuncT_co" , bound = np .ufunc , default = np .ufunc , covariant = True )
194
+ _ScalarT = TypeVar ("_ScalarT" , bound = np .generic )
192
195
_ShapeT = TypeVar ("_ShapeT" , bound = tuple [int , ...])
193
196
_ShapeT_co = TypeVar ("_ShapeT_co" , bound = tuple [int , ...], default = tuple [int , ...], covariant = True )
194
197
_DTypeT = TypeVar ("_DTypeT" , bound = np .dtype )
@@ -818,13 +821,41 @@ def array(
818
821
) -> Incomplete : ...
819
822
820
823
#
824
+ @overload
821
825
def min (
822
- obj : Incomplete ,
823
- axis : Incomplete = ...,
824
- out : Incomplete = ...,
825
- fill_value : Incomplete = ...,
826
- keepdims : Incomplete = ...,
827
- ) -> Incomplete : ...
826
+ obj : _ArrayLike [_ScalarT ],
827
+ axis : None = None ,
828
+ out : None = None ,
829
+ fill_value : _ScalarLike_co | None = None ,
830
+ keepdims : L [False ] | _NoValueType = ...,
831
+ ) -> _ScalarT : ...
832
+ @overload
833
+ def min (
834
+ obj : ArrayLike ,
835
+ axis : _ShapeLike | None = None ,
836
+ out : None = None ,
837
+ fill_value : _ScalarLike_co | None = None ,
838
+ keepdims : bool | _NoValueType = ...,
839
+ ) -> Any : ...
840
+ @overload
841
+ def min (
842
+ obj : ArrayLike ,
843
+ axis : None ,
844
+ out : _ArrayT ,
845
+ fill_value : _ScalarLike_co | None = None ,
846
+ keepdims : bool | _NoValueType = ...,
847
+ ) -> _ArrayT : ...
848
+ @overload
849
+ def min (
850
+ obj : ArrayLike ,
851
+ axis : _ShapeLike | None = None ,
852
+ * ,
853
+ out : _ArrayT ,
854
+ fill_value : _ScalarLike_co | None = None ,
855
+ keepdims : bool | _NoValueType = ...,
856
+ ) -> _ArrayT : ...
857
+
858
+ #
828
859
def max (
829
860
obj : Incomplete ,
830
861
axis : Incomplete = ...,
0 commit comments