8000 TYP: Add the missing ``casting`` keyword to ``np.clip`` by charris · Pull Request #24615 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

TYP: Add the missing casting keyword to np.clip #24615

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
Sep 1, 2023
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
TYP: Add the missing casting keyword to np.clip
  • Loading branch information
BvB93 authored and charris committed Sep 1, 2023
commit 7404e37619c058117f0b520ecfebc6a9318ba244
13 changes: 7 additions & 6 deletions numpy/core/fromnumeric.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ from numpy import (
_PartitionKind,
_SortKind,
_SortSide,
_CastingKind,
)
from numpy._typing import (
DTypeLike,
Expand Down Expand Up @@ -392,7 +393,7 @@ def clip(
order: _OrderKACF = ...,
subok: bool = ...,
signature: str | tuple[None | str, ...] = ...,
extobj: list[Any] = ...,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe the removal of extobj is correct here; #23922 is reserved for the 2.0 release, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beats me :) But if you think it needs to stay, I'll revise that part.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #24617.

casting: _CastingKind = ...,
) -> _SCT: ...
@overload
def clip(
Expand All @@ -406,7 +407,7 @@ def clip(
order: _OrderKACF = ...,
subok: bool = ...,
signature: str | tuple[None | str, ...] = ...,
extobj: list[Any] = ...,
casting: _CastingKind = ...,
) -> Any: ...
@overload
def clip(
Expand All @@ -420,7 +421,7 @@ def clip(
order: _OrderKACF = ...,
subok: bool = ...,
signature: str | tuple[None | str, ...] = ...,
extobj: list[Any] = ...,
casting: _CastingKind = ...,
) -> NDArray[_SCT]: ...
@overload
def clip(
Expand All @@ -434,7 +435,7 @@ def clip(
order: _OrderKACF = ...,
subok: bool = ...,
signature: s 84A7 tr | tuple[None | str, ...] = ...,
extobj: list[Any] = ...,
casting: _CastingKind = ...,
) -> NDArray[Any]: ...
@overload
def clip(
Expand All @@ -448,7 +449,7 @@ def clip(
order: _OrderKACF = ...,
subok: bool = ...,
signature: str | tuple[None | str, ...] = ...,
extobj: list[Any] = ...,
casting: _CastingKind = ...,
) -> Any: ...
@overload
def clip(
Expand All @@ -462,7 +463,7 @@ def clip(
order: _OrderKACF = ...,
subok: bool = ...,
signature: str | tuple[None | str, ...] = ...,
extobj: list[Any] = ...,
casting: _CastingKind = ...,
) -> _ArrayType: ...

@overload
Expand Down
0