8000 TYP: ``any(None)`` and ``all(None)`` by jorenham · Pull Request #29176 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

TYP: any(None) and all(None) #29176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions numpy/_core/fromnumeric.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -819,9 +819,10 @@ def sum(
where: _ArrayLikeBool_co = ...,
) -> _ArrayT: ...

# keep in sync with `any`
@overload
def all(
a: ArrayLike,
a: ArrayLike | None,
axis: None = None,
out: None = None,
keepdims: Literal[False, 0] | _NoValueType = ...,
Expand All @@ -830,7 +831,7 @@ def all(
) -> np.bool: ...
@overload
def all(
a: ArrayLike,
a: ArrayLike | None,
axis: int | tuple[int, ...] | None = None,
out: None = None,
keepdims: _BoolLike_co | _NoValueType = ...,
Expand All @@ -839,7 +840,7 @@ def all(
) -> Incomplete: ...
@overload
def all(
a: ArrayLike,
a: ArrayLike | None,
axis: int | tuple[int, ...] | None,
out: _ArrayT,
keepdims: _BoolLike_co | _NoValueType = ...,
Expand All @@ -848,17 +849,18 @@ def all(
) -> _ArrayT: ...
@overload
def all(
a: ArrayLike,
a: ArrayLike | None,
axis: int | tuple[int, ...] | None = None,
*,
out: _ArrayT,
keepdims: _BoolLike_co | _NoValueType = ...,
where: _ArrayLikeBool_co | _NoValueType = ...,
) -> _ArrayT: ...

# keep in sync with `all`
@overload
def any(
a: ArrayLike,
a: ArrayLike | None,
axis: None = None,
out: None = None,
keepdims: Literal[False, 0] | _NoValueType = ...,
Expand All @@ -867,7 +869,7 @@ def any(
) -> np.bool: ...
@overload
def any(
a: ArrayLike,
a: ArrayLike | None,
axis: int | tuple[int, ...] | None = None,
out: None = None,
keepdims: _BoolLike_co | _NoValueType = ...,
Expand All @@ -876,7 +878,7 @@ def any(
) -> Incomplete: ...
@overload
def any(
a: ArrayLike,
a: ArrayLike | None,
axis: int | tuple[int, ...] | None,
out: _ArrayT,
keepdims: _BoolLike_co | _NoValueType = ...,
Expand All @@ -885,14 +887,15 @@ def any(
) -> _ArrayT: ...
@overload
def any(
a: ArrayLike,
a: ArrayLike | None,
axis: int | tuple[int, ...] | None = None,
*,
out: _ArrayT,
keepdims: _BoolLike_co | _NoValueType = ...,
where: _ArrayLikeBool_co | _NoValueType = ...,
) -> _ArrayT: ...

#
@overload
def cumsum(
a: _ArrayLike[_ScalarT],
Expand Down
Loading
0