diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 672fd194568..55a13057e42 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -1040,6 +1040,8 @@ class _ArrayOrScalarCommon: axis: None = ..., out: None = ..., keepdims: L[False] = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> bool_: ... @overload def all( @@ -1047,6 +1049,8 @@ class _ArrayOrScalarCommon: axis: Optional[_ShapeLike] = ..., out: None = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def all( @@ -1054,6 +1058,8 @@ class _ArrayOrScalarCommon: axis: Optional[_ShapeLike] = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... @overload @@ -1062,6 +1068,8 @@ class _ArrayOrScalarCommon: axis: None = ..., out: None = ..., keepdims: L[False] = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> bool_: ... @overload def any( @@ -1069,6 +1077,8 @@ class _ArrayOrScalarCommon: axis: Optional[_ShapeLike] = ..., out: None = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def any( @@ -1076,6 +1086,8 @@ class _ArrayOrScalarCommon: axis: Optional[_ShapeLike] = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... @overload @@ -1258,6 +1270,8 @@ class _ArrayOrScalarCommon: dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def mean( @@ -1266,6 +1280,8 @@ class _ArrayOrScalarCommon: dtype: DTypeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... @overload @@ -1349,6 +1365,8 @@ class _ArrayOrScalarCommon: out: None = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def std( @@ -1358,6 +1376,8 @@ class _ArrayOrScalarCommon: out: _NdArraySubClass = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... @overload @@ -1389,6 +1409,8 @@ class _ArrayOrScalarCommon: out: None = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def var( @@ -1398,6 +1420,8 @@ class _ArrayOrScalarCommon: out: _NdArraySubClass = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... _DType = TypeVar("_DType", bound=dtype[Any]) diff --git a/numpy/core/fromnumeric.pyi b/numpy/core/fromnumeric.pyi index 3cbe1d5c5ce..4a5e50503fe 100644 --- a/numpy/core/fromnumeric.pyi +++ b/numpy/core/fromnumeric.pyi @@ -246,6 +246,8 @@ def all( axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> bool_: ... @overload def all( @@ -253,6 +255,8 @@ def all( axis: Optional[_ShapeLike] = ..., out: Optional[ndarray] = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload @@ -261,6 +265,8 @@ def any( axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> bool_: ... @overload def any( @@ -268,6 +274,8 @@ def any( axis: Optional[_ShapeLike] = ..., out: Optional[ndarray] = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... def cumsum( @@ -342,6 +350,8 @@ def mean( dtype: DTypeLike = ..., out: Optional[ndarray] = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... def std( @@ -351,6 +361,8 @@ def std( out: Optional[ndarray] = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... def var( @@ -360,4 +372,6 @@ def var( out: Optional[ndarray] = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ...