diff options
| author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-10-25 11:47:19 +0200 |
|---|---|---|
| committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-10-25 12:20:15 +0200 |
| commit | 6b02a0e637aa7db4f48e9c711310e732bab3813d (patch) | |
| tree | dbea3dc1855bcef327c82a640d2984fdecfa34ac | |
| parent | 7522da64dd7158169c06f7a6151509e56479e1ea (diff) | |
| download | numpy-6b02a0e637aa7db4f48e9c711310e732bab3813d.tar.gz | |
MAINT: Remove redundant `NoReturn` overloads
Previously these overloads had the (rather niche) purpose of preventing operations between `bytes`- and `int`-based array-likes, as `bytes` is a subtype of `Sequence[int]`.
Interestingly, these overloads have been made redundant by the introduction of the `npt._NestedSequence` protocol for the same reason as numpy/numpy#20037: `bytes` (and `str`) do not fully implement the `collections.abc.Sequence` interface. This "problem" could be fixed by changing the signature of `__contains__`, but in this it seems far more advantageous to leave things "broken" as it is.
| -rw-r--r-- | numpy/__init__.pyi | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 451ec87ed..347a66d27 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -1804,8 +1804,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): # strings, it will pass through the final overload otherwise @overload - def __lt__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __lt__(self: _ArrayNumber_co, other: _ArrayLikeNumber_co) -> NDArray[bool_]: ... @overload def __lt__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[bool_]: ... @@ -1817,8 +1815,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __lt__(self: NDArray[Any], other: _ArrayLikeObject_co) -> NDArray[bool_]: ... @overload - def __le__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __le__(self: _ArrayNumber_co, other: _ArrayLikeNumber_co) -> NDArray[bool_]: ... @overload def __le__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[bool_]: ... @@ -1830,8 +1826,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __le__(self: NDArray[Any], other: _ArrayLikeObject_co) -> NDArray[bool_]: ... @overload - def __gt__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __gt__(self: _ArrayNumber_co, other: _ArrayLikeNumber_co) -> NDArray[bool_]: ... @overload def __gt__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[bool_]: ... @@ -1843,8 +1837,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __gt__(self: NDArray[Any], other: _ArrayLikeObject_co) -> NDArray[bool_]: ... @overload - def __ge__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __ge__(self: _ArrayNumber_co, other: _ArrayLikeNumber_co) -> NDArray[bool_]: ... @overload def __ge__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[bool_]: ... @@ -1891,8 +1883,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): # Binary ops # NOTE: `ndarray` does not implement `__imatmul__` @overload - def __matmul__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __matmul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __matmul__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -1908,8 +1898,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __matmul__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rmatmul__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rmatmul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __rmatmul__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -1925,8 +1913,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rmatmul__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __mod__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __mod__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __mod__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -1942,8 +1928,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __mod__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rmod__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rmod__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __rmod__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -1959,8 +1943,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rmod__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __divmod__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __divmod__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> _2Tuple[NDArray[int8]]: ... # type: ignore[misc] @overload def __divmod__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> _2Tuple[NDArray[unsignedinteger[Any]]]: ... # type: ignore[misc] @@ -1972,8 +1954,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __divmod__(self: _ArrayTD64_co, other: _SupportsArray[dtype[timedelta64]] | _NestedSequence[_SupportsArray[dtype[timedelta64]]]) -> Tuple[NDArray[int64], NDArray[timedelta64]]: ... @overload - def __rdivmod__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rdivmod__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> _2Tuple[NDArray[int8]]: ... # type: ignore[misc] @overload def __rdivmod__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> _2Tuple[NDArray[unsignedinteger[Any]]]: ... # type: ignore[misc] @@ -1985,8 +1965,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rdivmod__(self: _ArrayTD64_co, other: _SupportsArray[dtype[timedelta64]] | _NestedSequence[_SupportsArray[dtype[timedelta64]]]) -> Tuple[NDArray[int64], NDArray[timedelta64]]: ... @overload - def __add__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __add__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __add__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2008,8 +1986,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __add__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __radd__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __radd__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __radd__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2031,8 +2007,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __radd__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __sub__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __sub__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NoReturn: ... @overload def __sub__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2054,8 +2028,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __sub__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rsub__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rsub__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NoReturn: ... @overload def __rsub__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2077,8 +2049,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rsub__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __mul__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __mul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __mul__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2098,8 +2068,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __mul__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rmul__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rmul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __rmul__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2119,8 +2087,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rmul__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __floordiv__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __floordiv__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __floordiv__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2140,8 +2106,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __floordiv__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rfloordiv__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rfloordiv__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __rfloordiv__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2161,8 +2125,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rfloordiv__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __pow__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __pow__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __pow__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2178,8 +2140,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __pow__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rpow__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rpow__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __rpow__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2195,8 +2155,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rpow__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __truediv__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __truediv__(self: _ArrayInt_co, other: _ArrayInt_co) -> NDArray[float64]: ... # type: ignore[misc] @overload def __truediv__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: ... # type: ignore[misc] @@ -2214,8 +2172,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __truediv__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rtruediv__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rtruediv__(self: _ArrayInt_co, other: _ArrayInt_co) -> NDArray[float64]: ... # type: ignore[misc] @overload def __rtruediv__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: ... # type: ignore[misc] @@ -2233,8 +2189,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rtruediv__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __lshift__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __lshift__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __lshift__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2246,8 +2200,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __lshift__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rlshift__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rlshift__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __rlshift__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2259,8 +2211,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rlshift__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rshift__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rshift__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __rshift__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2272,8 +2222,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rshift__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rrshift__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rrshift__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: ... # type: ignore[misc] @overload def __rrshift__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2285,8 +2233,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rrshift__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __and__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __and__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __and__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2298,8 +2244,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __and__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rand__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rand__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __rand__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2311,8 +2255,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rand__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __xor__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __xor__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __xor__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2324,8 +2266,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __xor__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __rxor__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __rxor__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __rxor__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2337,8 +2277,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __rxor__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __or__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __or__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __or__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2350,8 +2288,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __or__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... @overload - def __ror__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... - @overload def __ror__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... # type: ignore[misc] @overload def __ror__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: ... # type: ignore[misc] @@ -2363,8 +2299,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __ror__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: ... # `np.generic` does not support inplace operations - @overload # type: ignore[misc] - def __iadd__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __iadd__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... @overload @@ -2382,8 +2316,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __iadd__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __isub__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __isub__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[_NBit1]]: ... @overload @@ -2399,8 +2331,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __isub__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __imul__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __imul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... @overload @@ -2416,8 +2346,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __imul__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __itruediv__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __itruediv__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: ... @overload @@ -2429,8 +2357,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __itruediv__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __ifloordiv__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __ifloordiv__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[_NBit1]]: ... @overload @@ -2446,8 +2372,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __ifloordiv__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __ipow__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __ipow__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[_NBit1]]: ... @overload @@ -2459,8 +2383,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __ipow__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __imod__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __imod__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[_NBit1]]: ... @overload @@ -2472,8 +2394,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __imod__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __ilshift__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __ilshift__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[_NBit1]]: ... @overload @@ -2481,8 +2401,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __ilshift__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __irshift__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __irshift__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[_NBit1]]: ... @overload @@ -2490,8 +2408,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __irshift__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __iand__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __iand__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... @overload @@ -2501,8 +2417,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __iand__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __ixor__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __ixor__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... @overload @@ -2512,8 +2426,6 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): @overload def __ixor__(self: NDArray[object_], other: Any) -> NDArray[object_]: ... - @overload # type: ignore[misc] - def __ior__(self: NDArray[Any], other: bytes | _NestedSequence[bytes]) -> NoReturn: ... @overload def __ior__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: ... @overload |
