diff options
| author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-05-10 23:59:28 +0200 |
|---|---|---|
| committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-05-10 23:59:28 +0200 |
| commit | 1bb04bbdfa27a31cf081b64fb91d5be9fdb8ce0a (patch) | |
| tree | 4e176749de3ca6826ac4fb18dbed75a58d7a1812 /numpy | |
| parent | 7c4b2482a9ae8e1587871665fe8c0ea622b5f360 (diff) | |
| download | numpy-1bb04bbdfa27a31cf081b64fb91d5be9fdb8ce0a.tar.gz | |
MAINT: Remove the PEP 604 pipe operator
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/__init__.pyi | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 8824497f0..01a08f24a 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -1063,7 +1063,7 @@ class dtype(Generic[_DTypeScalar_co]): @overload def __getitem__(self: dtype[void], key: List[str]) -> dtype[void]: ... @overload - def __getitem__(self: dtype[void], key: str | int) -> dtype[Any]: ... + def __getitem__(self: dtype[void], key: Union[str, int]) -> dtype[Any]: ... # NOTE: In the future 1-based multiplications will also yield `void` dtypes @overload @@ -2566,7 +2566,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): # `np.generic` does not support inplace operations @overload # type: ignore[misc] - def __iadd__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __iadd__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __iadd__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ... @overload @@ -2587,7 +2587,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __iadd__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __isub__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __isub__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __isub__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ... @overload @@ -2606,7 +2606,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __isub__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __imul__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __imul__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __imul__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ... @overload @@ -2625,7 +2625,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __imul__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __itruediv__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __itruediv__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __itruediv__(self: _ArrayND[floating[_NBit1]], other: _ArrayLikeFloat_co) -> _ArrayND[floating[_NBit1]]: ... @overload @@ -2640,7 +2640,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __itruediv__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __ifloordiv__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __ifloordiv__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __ifloordiv__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ... @overload @@ -2659,7 +2659,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __ifloordiv__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __ipow__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __ipow__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __ipow__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ... @overload @@ -2674,7 +2674,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __ipow__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __imod__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __imod__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __imod__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ... @overload @@ -2689,7 +2689,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __imod__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __ilshift__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __ilshift__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __ilshift__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ... @overload @@ -2700,7 +2700,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __ilshift__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __irshift__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __irshift__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __irshift__(self: _ArrayND[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> _ArrayND[unsignedinteger[_NBit1]]: ... @overload @@ -2711,7 +2711,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __irshift__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __iand__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __iand__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __iand__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ... @overload @@ -2724,7 +2724,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __iand__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __ixor__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __ixor__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __ixor__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ... @overload @@ -2737,7 +2737,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): def __ixor__(self: _ArrayND[_ScalarType], other: _RecursiveSequence) -> _ArrayND[_ScalarType]: ... @overload # type: ignore[misc] - def __ior__(self: _ArrayND[Any], other: _NestedSequence[str | bytes]) -> NoReturn: ... + def __ior__(self: _ArrayND[Any], other: _NestedSequence[Union[str, bytes]]) -> NoReturn: ... @overload def __ior__(self: _ArrayND[bool_], other: _ArrayLikeBool_co) -> _ArrayND[bool_]: ... @overload |
