8000 ENH: Add dtype-support to the ufunc-based `ndarray` magic methods 2/4 by BvB93 · Pull Request #18228 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Add dtype-support to the ufunc-based ndarray magic methods 2/4 #18228

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 4 commits into from
Feb 1, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
MAINT: Added a missing overload for `ndarray[Any],ArrayLike[object_]-…
…>Any`

The previous PR added support for `ndarray[object_],Any->Any` but its inverse was still missing
  • Loading branch information
Bas van Beek committed Jan 25, 2021
commit 598676ce0ecaa6cd99f423c178d6e712625d20ea
8 changes: 8 additions & 0 deletions numpy/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,8 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
@overload
def __lt__(self: _ArrayND[object_], other: Any) -> _ArrayOrScalar[bool_]: ...
@overload
def __lt__(self: _ArrayND[Any], other: _ArrayLikeObject_co) -> _ArrayOrScalar[bool_]: ...
@overload
def __lt__(
self: _ArrayND[Union[number[Any], datetime64, timedelta64, bool_]],
other: _RecursiveSequence,
Expand All @@ -1523,6 +1525,8 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
@overload
def __le__(self: _ArrayND[object_], other: Any) -> _ArrayOrScalar[bool_]: ...
@overload
def __le__(self: _ArrayND[Any], other: _ArrayLikeObject_co) -> _ArrayOrScalar[bool_]: ...
@overload
def __le__(
self: _ArrayND[Union[number[Any], datetime64, timedelta64, bool_]],
other: _RecursiveSequence,
Expand All @@ -1539,6 +1543,8 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
@overload
def __gt__(self: _ArrayND[object_], other: Any) -> _ArrayOrScalar[bool_]: ...
@overload
def __gt__(self: _ArrayND[Any], other: _ArrayLikeObject_co) -> _ArrayOrScalar[bool_]: ...
@overload
def __gt__(
self: _ArrayND[Union[number[Any], datetime64, timedelta64, bool_]],
other: _RecursiveSequence,
Expand All @@ -1555,6 +1561,8 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
@overload
def __ge__(self: _ArrayND[object_], other: Any) -> _ArrayOrScalar[bool_]: ...
@overload
def __ge__(self: _ArrayND[Any], other: _ArrayLikeObject_co) -> _ArrayOrScalar[bool_]: ...
@overload
def __ge__(
self: _ArrayND[Union[number[Any], datetime64, timedelta64, bool_]],
other: _RecursiveSequence,
Expand Down
0