diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index c6f59c4ca716..0684f477c716 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -1030,6 +1030,8 @@ class _ArrayOrScalarCommon: axis: None = ..., out: None = ..., keepdims: L[False] = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> bool_: ... @overload def all( @@ -1037,6 +1039,8 @@ class _ArrayOrScalarCommon: axis: Optional[_ShapeLike] = ..., out: None = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def all( @@ -1044,6 +1048,8 @@ class _ArrayOrScalarCommon: axis: Optional[_ShapeLike] = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... @overload @@ -1052,6 +1058,8 @@ class _ArrayOrScalarCommon: axis: None = ..., out: None = ..., keepdims: L[False] = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> bool_: ... @overload def any( @@ -1059,6 +1067,8 @@ class _ArrayOrScalarCommon: axis: Optional[_ShapeLike] = ..., out: None = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def any( @@ -1066,6 +1076,8 @@ class _ArrayOrScalarCommon: axis: Optional[_ShapeLike] = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... @overload @@ -1248,6 +1260,8 @@ class _ArrayOrScalarCommon: dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def mean( @@ -1256,6 +1270,8 @@ class _ArrayOrScalarCommon: dtype: DTypeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... @overload @@ -1339,6 +1355,8 @@ class _ArrayOrScalarCommon: out: None = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def std( @@ -1348,6 +1366,8 @@ class _ArrayOrScalarCommon: out: _NdArraySubClass = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> _NdArraySubClass: ... @overload @@ -1379,6 +1399,8 @@ class _ArrayOrScalarCommon: out: None = ..., ddof: int = ..., keepdims: bool = ..., + *, + where: _ArrayLikeBool_co = ..., ) -> Any: ... @overload def var( @@ -1388,6 +1410,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 3cbe1d5c5ce2..4a5e50503fe0 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: ...