|
Expand Up
|
@@ -2809,6 +2809,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
@overload |
|
|
def __rdivmod__(self: NDArray[timedelta64], lhs: _ArrayLike[timedelta64], /) -> tuple[NDArray[int64], NDArray[timedelta64]]: ... |
|
|
|
|
|
# Keep in sync with `MaskedArray.__add__` |
|
|
@overload |
|
|
def __add__(self: NDArray[_NumberT], other: int | np.bool, /) -> ndarray[_ShapeT_co, dtype[_NumberT]]: ... |
|
|
@overload |
|
Expand Down
Expand Up
|
@@ -2856,6 +2857,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
@overload |
|
|
def __add__(self: NDArray[Any], other: _ArrayLikeObject_co, /) -> Any: ... |
|
|
|
|
|
# Keep in sync with `MaskedArray.__radd__` |
|
|
@overload # signature equivalent to __add__ |
|
|
def __radd__(self: NDArray[_NumberT], other: int | np.bool, /) -> ndarray[_ShapeT_co, dtype[_NumberT]]: ... |
|
|
@overload |
|
Expand Down
Expand Up
|
@@ -2903,6 +2905,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
@overload |
|
|
def __radd__(self: NDArray[Any], other: _ArrayLikeObject_co, /) -> Any: ... |
|
|
|
|
|
# Keep in sync with `MaskedArray.__sub__` |
|
|
@overload |
|
|
def __sub__(self: NDArray[_NumberT], other: int | np.bool, /) -> ndarray[_ShapeT_co, dtype[_NumberT]]: ... |
|
|
@overload |
|
Expand Down
Expand Up
|
@@ -2940,6 +2943,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
@overload |
|
|
def __sub__(self: NDArray[Any], other: _ArrayLikeObject_co, /) -> Any: ... |
|
|
|
|
|
# Keep in sync with `MaskedArray.__rsub__` |
|
|
@overload |
|
|
def __rsub__(self: NDArray[_NumberT], other: int | np.bool, /) -> ndarray[_ShapeT_co, dtype[_NumberT]]: ... |
|
|
@overload |
|
Expand Down
Expand Up
|
@@ -3359,6 +3363,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
# object and its value is >= 0 |
|
|
# NOTE: Due to a mypy bug, overloading on e.g. `self: NDArray[SCT_floating]` won't |
|
|
# work, as this will lead to `false negatives` when using these inplace ops. |
|
|
# Keep in sync with `MaskedArray.__iadd__` |
|
|
@overload |
|
|
def __iadd__(self: NDArray[np.bool], other: _ArrayLikeBool_co, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
@overload |
|
Expand Down
Expand Up
|
@@ -3386,7 +3391,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
@overload |
|
|
def __iadd__(self: NDArray[object_], other: Any, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
|
|
|
# |
|
|
# Keep in sync with `MaskedArray.__isub__` |
|
|
@overload |
|
|
def __isub__( |
|
|
self: NDArray[unsignedinteger], |
|
Expand All
|
@@ -3404,7 +3409,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
@overload |
|
|
def __isub__(self: NDArray[object_], other: Any, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
|
|
|
# |
|
|
# Keep in sync with `MaskedArray.__imul__` |
|
|
@overload |
|
|
def __imul__(self: NDArray[np.bool], other: _ArrayLikeBool_co, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
@overload |
|
Expand All
|
@@ -3426,6 +3431,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
@overload |
|
|
def __imul__(self: NDArray[object_], other: Any, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
|
|
|
# Keep in sync with `MaskedArray.__ipow__` |
|
|
@overload |
|
|
def __ipow__( |
|
|
self: NDArray[unsignedinteger], |
|
Expand All
|
@@ -3441,15 +3447,15 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): |
|
|
@overload |
|
|
def __ipow__(self: NDArray[object_], other: Any, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
|
|
|
# |
|
|
# Keep in sync with `MaskedArray.__itruediv__` |
|
|
@overload |
|
|
def __itruediv__(self: NDArray[floating | timedelta64], other: _ArrayLikeFloat_co, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
@overload |
|
|
def __itruediv__(self: NDArray[complexfloating], other: _ArrayLikeComplex_co, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
@overload |
|
|
def __itruediv__(self: NDArray[object_], other: Any, /) -> ndarray[_ShapeT_co, _DTypeT_co]: ... |
|
|
|
|
|
# keep in sync with `__imod__` |
|
|
# keep in sync with `__imod__` and `MaskedArray.__ifloordiv__` |
|
|
@overload |
|
|
def __ifloordiv__( |
|
|
self: NDArray[unsignedinteger], |
|
Expand Down
|
|