numpy 2.3.2__cp311-cp311-win32.whl → 2.3.4__cp311-cp311-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of numpy might be problematic. Click here for more details.
- numpy/__config__.py +4 -4
- numpy/__init__.pyi +1101 -340
- numpy/_core/_multiarray_tests.cp311-win32.lib +0 -0
- numpy/_core/_multiarray_tests.cp311-win32.pyd +0 -0
- numpy/_core/_multiarray_umath.cp311-win32.lib +0 -0
- numpy/_core/_multiarray_umath.cp311-win32.pyd +0 -0
- numpy/_core/_operand_flag_tests.cp311-win32.lib +0 -0
- numpy/_core/_operand_flag_tests.cp311-win32.pyd +0 -0
- numpy/_core/_rational_tests.cp311-win32.lib +0 -0
- numpy/_core/_rational_tests.cp311-win32.pyd +0 -0
- numpy/_core/_simd.cp311-win32.lib +0 -0
- numpy/_core/_simd.cp311-win32.pyd +0 -0
- numpy/_core/_struct_ufunc_tests.cp311-win32.lib +0 -0
- numpy/_core/_struct_ufunc_tests.cp311-win32.pyd +0 -0
- numpy/_core/_ufunc_config.py +2 -0
- numpy/_core/_ufunc_config.pyi +52 -6
- numpy/_core/_umath_tests.cp311-win32.lib +0 -0
- numpy/_core/_umath_tests.cp311-win32.pyd +0 -0
- numpy/_core/lib/npymath.lib +0 -0
- numpy/_core/lib/pkgconfig/numpy.pc +1 -1
- numpy/_core/numerictypes.py +1 -1
- numpy/_core/tests/test_api.py +34 -1
- numpy/_core/tests/test_datetime.py +24 -0
- numpy/_core/tests/test_numerictypes.py +29 -0
- numpy/_core/tests/test_stringdtype.py +23 -16
- numpy/_core/tests/test_strings.py +15 -0
- numpy/_core/tests/test_umath.py +12 -0
- numpy/distutils/__pycache__/conv_template.cpython-311.pyc +0 -0
- numpy/exceptions.pyi +2 -0
- numpy/fft/_pocketfft_umath.cp311-win32.lib +0 -0
- numpy/fft/_pocketfft_umath.cp311-win32.pyd +0 -0
- numpy/lib/_arraysetops_impl.pyi +24 -0
- numpy/lib/_histograms_impl.pyi +8 -8
- numpy/lib/_index_tricks_impl.pyi +12 -0
- numpy/lib/_polynomial_impl.pyi +10 -8
- numpy/lib/mixins.pyi +2 -0
- numpy/lib/tests/test_index_tricks.py +5 -0
- numpy/linalg/_linalg.py +1 -0
- numpy/linalg/_linalg.pyi +32 -39
- numpy/linalg/_umath_linalg.cp311-win32.lib +0 -0
- numpy/linalg/_umath_linalg.cp311-win32.pyd +0 -0
- numpy/linalg/lapack_lite.cp311-win32.lib +0 -0
- numpy/linalg/lapack_lite.cp311-win32.pyd +0 -0
- numpy/linalg/tests/test_linalg.py +14 -1
- numpy/ma/extras.pyi +4 -0
- numpy/random/_bounded_integers.cp311-win32.lib +0 -0
- numpy/random/_bounded_integers.cp311-win32.pyd +0 -0
- numpy/random/_common.cp311-win32.lib +0 -0
- numpy/random/_common.cp311-win32.pyd +0 -0
- numpy/random/_generator.cp311-win32.lib +0 -0
- numpy/random/_generator.cp311-win32.pyd +0 -0
- numpy/random/_mt19937.cp311-win32.lib +0 -0
- numpy/random/_mt19937.cp311-win32.pyd +0 -0
- numpy/random/_pcg64.cp311-win32.lib +0 -0
- numpy/random/_pcg64.cp311-win32.pyd +0 -0
- numpy/random/_philox.cp311-win32.lib +0 -0
- numpy/random/_philox.cp311-win32.pyd +0 -0
- numpy/random/_sfc64.cp311-win32.lib +0 -0
- numpy/random/_sfc64.cp311-win32.pyd +0 -0
- numpy/random/bit_generator.cp311-win32.lib +0 -0
- numpy/random/bit_generator.cp311-win32.pyd +0 -0
- numpy/random/lib/npyrandom.lib +0 -0
- numpy/random/mtrand.cp311-win32.lib +0 -0
- numpy/random/mtrand.cp311-win32.pyd +0 -0
- numpy/random/tests/test_generator_mt19937.py +5 -0
- numpy/testing/_private/extbuild.pyi +3 -3
- numpy/testing/_private/utils.pyi +1 -1
- numpy/tests/test_configtool.py +1 -1
- numpy/typing/tests/data/fail/arithmetic.pyi +1 -1
- numpy/typing/tests/data/fail/bitwise_ops.pyi +4 -4
- numpy/typing/tests/data/fail/scalars.pyi +6 -6
- numpy/typing/tests/data/reveal/arithmetic.pyi +29 -29
- numpy/typing/tests/data/reveal/array_constructors.pyi +5 -5
- numpy/typing/tests/data/reveal/bitwise_ops.pyi +10 -11
- numpy/typing/tests/data/reveal/linalg.pyi +6 -6
- numpy/typing/tests/data/reveal/mod.pyi +18 -19
- numpy/version.py +2 -2
- {numpy-2.3.2.dist-info → numpy-2.3.4.dist-info}/LICENSE.txt +881 -881
- {numpy-2.3.2.dist-info → numpy-2.3.4.dist-info}/METADATA +1 -1
- {numpy-2.3.2.dist-info → numpy-2.3.4.dist-info}/RECORD +82 -83
- numpy/_typing/_callable.pyi +0 -366
- {numpy-2.3.2.dist-info → numpy-2.3.4.dist-info}/WHEEL +0 -0
- {numpy-2.3.2.dist-info → numpy-2.3.4.dist-info}/entry_points.txt +0 -0
numpy/__init__.pyi
CHANGED
|
@@ -133,32 +133,6 @@ from numpy._typing import (
|
|
|
133
133
|
_GUFunc_Nin2_Nout1,
|
|
134
134
|
)
|
|
135
135
|
|
|
136
|
-
from numpy._typing._callable import (
|
|
137
|
-
_BoolOp,
|
|
138
|
-
_BoolBitOp,
|
|
139
|
-
_BoolSub,
|
|
140
|
-
_BoolTrueDiv,
|
|
141
|
-
_BoolMod,
|
|
142
|
-
_BoolDivMod,
|
|
143
|
-
_IntTrueDiv,
|
|
144
|
-
_UnsignedIntOp,
|
|
145
|
-
_UnsignedIntBitOp,
|
|
146
|
-
_UnsignedIntMod,
|
|
147
|
-
_UnsignedIntDivMod,
|
|
148
|
-
_SignedIntOp,
|
|
149
|
-
_SignedIntBitOp,
|
|
150
|
-
_SignedIntMod,
|
|
151
|
-
_SignedIntDivMod,
|
|
152
|
-
_FloatOp,
|
|
153
|
-
_FloatMod,
|
|
154
|
-
_FloatDivMod,
|
|
155
|
-
_NumberOp,
|
|
156
|
-
_ComparisonOpLT,
|
|
157
|
-
_ComparisonOpLE,
|
|
158
|
-
_ComparisonOpGT,
|
|
159
|
-
_ComparisonOpGE,
|
|
160
|
-
)
|
|
161
|
-
|
|
162
136
|
# NOTE: Numpy's mypy plugin is used for removing the types unavailable to the specific platform
|
|
163
137
|
from numpy._typing._extended_precision import (
|
|
164
138
|
float96,
|
|
@@ -217,7 +191,7 @@ from typing import (
|
|
|
217
191
|
# library include `typing_extensions` stubs:
|
|
218
192
|
# https://github.com/python/typeshed/blob/main/stdlib/typing_extensions.pyi
|
|
219
193
|
from _typeshed import Incomplete, StrOrBytesPath, SupportsFlush, SupportsLenAndGetItem, SupportsWrite
|
|
220
|
-
from typing_extensions import CapsuleType, TypeVar
|
|
194
|
+
from typing_extensions import CapsuleType, TypeVar, deprecated, override
|
|
221
195
|
|
|
222
196
|
from numpy import (
|
|
223
197
|
char,
|
|
@@ -321,8 +295,7 @@ from numpy._core._ufunc_config import (
|
|
|
321
295
|
getbufsize,
|
|
322
296
|
seterrcall,
|
|
323
297
|
geterrcall,
|
|
324
|
-
|
|
325
|
-
_ErrCall,
|
|
298
|
+
errstate,
|
|
326
299
|
)
|
|
327
300
|
|
|
328
301
|
from numpy._core.arrayprint import (
|
|
@@ -782,8 +755,6 @@ _T_contra = TypeVar("_T_contra", contravariant=True)
|
|
|
782
755
|
_RealT_co = TypeVar("_RealT_co", covariant=True)
|
|
783
756
|
_ImagT_co = TypeVar("_ImagT_co", covariant=True)
|
|
784
757
|
|
|
785
|
-
_CallableT = TypeVar("_CallableT", bound=Callable[..., object])
|
|
786
|
-
|
|
787
758
|
_DTypeT = TypeVar("_DTypeT", bound=dtype)
|
|
788
759
|
_DTypeT_co = TypeVar("_DTypeT_co", bound=dtype, default=dtype, covariant=True)
|
|
789
760
|
_FlexDTypeT = TypeVar("_FlexDTypeT", bound=dtype[flexible])
|
|
@@ -803,6 +774,7 @@ _1NShapeT = TypeVar("_1NShapeT", bound=tuple[L[1], *tuple[L[1], ...]]) # (1,) |
|
|
|
803
774
|
_ScalarT = TypeVar("_ScalarT", bound=generic)
|
|
804
775
|
_ScalarT_co = TypeVar("_ScalarT_co", bound=generic, default=Any, covariant=True)
|
|
805
776
|
_NumberT = TypeVar("_NumberT", bound=number)
|
|
777
|
+
_InexactT = TypeVar("_InexactT", bound=inexact)
|
|
806
778
|
_RealNumberT = TypeVar("_RealNumberT", bound=floating | integer)
|
|
807
779
|
_FloatingT_co = TypeVar("_FloatingT_co", bound=floating, default=floating, covariant=True)
|
|
808
780
|
_IntegerT = TypeVar("_IntegerT", bound=integer)
|
|
@@ -1058,6 +1030,26 @@ class _FormerAttrsDict(TypedDict):
|
|
|
1058
1030
|
|
|
1059
1031
|
### Protocols (for internal use only)
|
|
1060
1032
|
|
|
1033
|
+
@final
|
|
1034
|
+
@type_check_only
|
|
1035
|
+
class _SupportsLT(Protocol):
|
|
1036
|
+
def __lt__(self, other: Any, /) -> Any: ...
|
|
1037
|
+
|
|
1038
|
+
@final
|
|
1039
|
+
@type_check_only
|
|
1040
|
+
class _SupportsLE(Protocol):
|
|
1041
|
+
def __le__(self, other: Any, /) -> Any: ...
|
|
1042
|
+
|
|
1043
|
+
@final
|
|
1044
|
+
@type_check_only
|
|
1045
|
+
class _SupportsGT(Protocol):
|
|
1046
|
+
def __gt__(self, other: Any, /) -> Any: ...
|
|
1047
|
+
|
|
1048
|
+
@final
|
|
1049
|
+
@type_check_only
|
|
1050
|
+
class _SupportsGE(Protocol):
|
|
1051
|
+
def __ge__(self, other: Any, /) -> Any: ...
|
|
1052
|
+
|
|
1061
1053
|
@type_check_only
|
|
1062
1054
|
class _SupportsFileMethods(SupportsFlush, Protocol):
|
|
1063
1055
|
# Protocol for representing file-like-objects accepted by `ndarray.tofile` and `fromfile`
|
|
@@ -2151,7 +2143,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
|
|
|
2151
2143
|
@strides.setter
|
|
2152
2144
|
def strides(self, value: _ShapeLike) -> None: ...
|
|
2153
2145
|
def byteswap(self, inplace: builtins.bool = ...) -> Self: ...
|
|
2154
|
-
def fill(self, value: Any) -> None: ...
|
|
2146
|
+
def fill(self, value: Any, /) -> None: ...
|
|
2155
2147
|
@property
|
|
2156
2148
|
def flat(self) -> flatiter[Self]: ...
|
|
2157
2149
|
|
|
@@ -3517,7 +3509,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
|
|
|
3517
3509
|
# See https://github.com/numpy/numpy-stubs/pull/80 for more details.
|
|
3518
3510
|
class generic(_ArrayOrScalarCommon, Generic[_ItemT_co]):
|
|
3519
3511
|
@abstractmethod
|
|
3520
|
-
def
|
|
3512
|
+
def __new__(cls) -> Self: ...
|
|
3521
3513
|
def __hash__(self) -> int: ...
|
|
3522
3514
|
@overload
|
|
3523
3515
|
def __array__(self, dtype: None = None, /) -> ndarray[tuple[()], dtype[Self]]: ...
|
|
@@ -3779,30 +3771,51 @@ class generic(_ArrayOrScalarCommon, Generic[_ItemT_co]):
|
|
|
3779
3771
|
|
|
3780
3772
|
class number(generic[_NumberItemT_co], Generic[_NBit, _NumberItemT_co]):
|
|
3781
3773
|
@abstractmethod
|
|
3782
|
-
def
|
|
3774
|
+
def __new__(cls) -> Self: ...
|
|
3783
3775
|
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
|
3784
3776
|
|
|
3785
3777
|
def __neg__(self) -> Self: ...
|
|
3786
3778
|
def __pos__(self) -> Self: ...
|
|
3787
3779
|
def __abs__(self) -> Self: ...
|
|
3788
3780
|
|
|
3789
|
-
__add__:
|
|
3790
|
-
__radd__:
|
|
3791
|
-
__sub__:
|
|
3792
|
-
__rsub__:
|
|
3793
|
-
__mul__:
|
|
3794
|
-
__rmul__:
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3781
|
+
def __add__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3782
|
+
def __radd__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3783
|
+
def __sub__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3784
|
+
def __rsub__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3785
|
+
def __mul__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3786
|
+
def __rmul__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3787
|
+
def __pow__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3788
|
+
def __rpow__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3789
|
+
def __truediv__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3790
|
+
def __rtruediv__(self, other: _NumberLike_co, /) -> Incomplete: ...
|
|
3791
|
+
|
|
3792
|
+
@overload
|
|
3793
|
+
def __lt__(self, other: _NumberLike_co, /) -> bool_: ...
|
|
3794
|
+
@overload
|
|
3795
|
+
def __lt__(self, other: _ArrayLikeNumber_co | _NestedSequence[_SupportsGT], /) -> NDArray[bool_]: ...
|
|
3796
|
+
@overload
|
|
3797
|
+
def __lt__(self, other: _SupportsGT, /) -> bool_: ...
|
|
3798
|
+
|
|
3799
|
+
@overload
|
|
3800
|
+
def __le__(self, other: _NumberLike_co, /) -> bool_: ...
|
|
3801
|
+
@overload
|
|
3802
|
+
def __le__(self, other: _ArrayLikeNumber_co | _NestedSequence[_SupportsGE], /) -> NDArray[bool_]: ...
|
|
3803
|
+
@overload
|
|
3804
|
+
def __le__(self, other: _SupportsGE, /) -> bool_: ...
|
|
3805
|
+
|
|
3806
|
+
@overload
|
|
3807
|
+
def __gt__(self, other: _NumberLike_co, /) -> bool_: ...
|
|
3808
|
+
@overload
|
|
3809
|
+
def __gt__(self, other: _ArrayLikeNumber_co | _NestedSequence[_SupportsLT], /) -> NDArray[bool_]: ...
|
|
3810
|
+
@overload
|
|
3811
|
+
def __gt__(self, other: _SupportsLT, /) -> bool_: ...
|
|
3812
|
+
|
|
3813
|
+
@overload
|
|
3814
|
+
def __ge__(self, other: _NumberLike_co, /) -> bool_: ...
|
|
3815
|
+
@overload
|
|
3816
|
+
def __ge__(self, other: _ArrayLikeNumber_co | _NestedSequence[_SupportsLE], /) -> NDArray[bool_]: ...
|
|
3817
|
+
@overload
|
|
3818
|
+
def __ge__(self, other: _SupportsLE, /) -> bool_: ...
|
|
3806
3819
|
|
|
3807
3820
|
class bool(generic[_BoolItemT_co], Generic[_BoolItemT_co]):
|
|
3808
3821
|
@property
|
|
@@ -3815,21 +3828,23 @@ class bool(generic[_BoolItemT_co], Generic[_BoolItemT_co]):
|
|
|
3815
3828
|
def imag(self) -> np.bool[L[False]]: ...
|
|
3816
3829
|
|
|
3817
3830
|
@overload # mypy bug workaround: https://github.com/numpy/numpy/issues/29245
|
|
3818
|
-
def
|
|
3831
|
+
def __new__(cls, value: Never, /) -> np.bool[builtins.bool]: ...
|
|
3819
3832
|
@overload
|
|
3820
|
-
def
|
|
3833
|
+
def __new__(cls, value: _Falsy = ..., /) -> np.bool[L[False]]: ...
|
|
3821
3834
|
@overload
|
|
3822
|
-
def
|
|
3835
|
+
def __new__(cls, value: _Truthy, /) -> np.bool[L[True]]: ...
|
|
3823
3836
|
@overload
|
|
3824
|
-
def
|
|
3837
|
+
def __new__(cls, value: object, /) -> np.bool[builtins.bool]: ...
|
|
3825
3838
|
|
|
3826
3839
|
def __bool__(self, /) -> _BoolItemT_co: ...
|
|
3840
|
+
|
|
3827
3841
|
@overload
|
|
3828
3842
|
def __int__(self: np.bool[L[False]], /) -> L[0]: ...
|
|
3829
3843
|
@overload
|
|
3830
3844
|
def __int__(self: np.bool[L[True]], /) -> L[1]: ...
|
|
3831
3845
|
@overload
|
|
3832
3846
|
def __int__(self, /) -> L[0, 1]: ...
|
|
3847
|
+
|
|
3833
3848
|
def __abs__(self) -> Self: ...
|
|
3834
3849
|
|
|
3835
3850
|
@overload
|
|
@@ -3839,23 +3854,191 @@ class bool(generic[_BoolItemT_co], Generic[_BoolItemT_co]):
|
|
|
3839
3854
|
@overload
|
|
3840
3855
|
def __invert__(self, /) -> np.bool: ...
|
|
3841
3856
|
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3857
|
+
@overload
|
|
3858
|
+
def __add__(self, other: _NumberT, /) -> _NumberT: ...
|
|
3859
|
+
@overload
|
|
3860
|
+
def __add__(self, other: builtins.bool | bool_, /) -> bool_: ...
|
|
3861
|
+
@overload
|
|
3862
|
+
def __add__(self, other: int, /) -> int_: ...
|
|
3863
|
+
@overload
|
|
3864
|
+
def __add__(self, other: float, /) -> float64: ...
|
|
3865
|
+
@overload
|
|
3866
|
+
def __add__(self, other: complex, /) -> complex128: ...
|
|
3867
|
+
|
|
3868
|
+
@overload
|
|
3869
|
+
def __radd__(self, other: _NumberT, /) -> _NumberT: ...
|
|
3870
|
+
@overload
|
|
3871
|
+
def __radd__(self, other: builtins.bool, /) -> bool_: ...
|
|
3872
|
+
@overload
|
|
3873
|
+
def __radd__(self, other: int, /) -> int_: ...
|
|
3874
|
+
@overload
|
|
3875
|
+
def __radd__(self, other: float, /) -> float64: ...
|
|
3876
|
+
@overload
|
|
3877
|
+
def __radd__(self, other: complex, /) -> complex128: ...
|
|
3878
|
+
|
|
3879
|
+
@overload
|
|
3880
|
+
def __sub__(self, other: _NumberT, /) -> _NumberT: ...
|
|
3881
|
+
@overload
|
|
3882
|
+
def __sub__(self, other: int, /) -> int_: ...
|
|
3883
|
+
@overload
|
|
3884
|
+
def __sub__(self, other: float, /) -> float64: ...
|
|
3885
|
+
@overload
|
|
3886
|
+
def __sub__(self, other: complex, /) -> complex128: ...
|
|
3887
|
+
|
|
3888
|
+
@overload
|
|
3889
|
+
def __rsub__(self, other: _NumberT, /) -> _NumberT: ...
|
|
3890
|
+
@overload
|
|
3891
|
+
def __rsub__(self, other: int, /) -> int_: ...
|
|
3892
|
+
@overload
|
|
3893
|
+
def __rsub__(self, other: float, /) -> float64: ...
|
|
3894
|
+
@overload
|
|
3895
|
+
def __rsub__(self, other: complex, /) -> complex128: ...
|
|
3896
|
+
|
|
3897
|
+
@overload
|
|
3898
|
+
def __mul__(self, other: _NumberT, /) -> _NumberT: ...
|
|
3899
|
+
@overload
|
|
3900
|
+
def __mul__(self, other: builtins.bool | bool_, /) -> bool_: ...
|
|
3901
|
+
@overload
|
|
3902
|
+
def __mul__(self, other: int, /) -> int_: ...
|
|
3903
|
+
@overload
|
|
3904
|
+
def __mul__(self, other: float, /) -> float64: ...
|
|
3905
|
+
@overload
|
|
3906
|
+
def __mul__(self, other: complex, /) -> complex128: ...
|
|
3907
|
+
|
|
3908
|
+
@overload
|
|
3909
|
+
def __rmul__(self, other: _NumberT, /) -> _NumberT: ...
|
|
3910
|
+
@overload
|
|
3911
|
+
def __rmul__(self, other: builtins.bool, /) -> bool_: ...
|
|
3912
|
+
@overload
|
|
3913
|
+
def __rmul__(self, other: int, /) -> int_: ...
|
|
3914
|
+
@overload
|
|
3915
|
+
def __rmul__(self, other: float, /) -> float64: ...
|
|
3916
|
+
@overload
|
|
3917
|
+
def __rmul__(self, other: complex, /) -> complex128: ...
|
|
3918
|
+
|
|
3919
|
+
@overload
|
|
3920
|
+
def __pow__(self, other: _NumberT, mod: None = None, /) -> _NumberT: ...
|
|
3921
|
+
@overload
|
|
3922
|
+
def __pow__(self, other: builtins.bool | bool_, mod: None = None, /) -> int8: ...
|
|
3923
|
+
@overload
|
|
3924
|
+
def __pow__(self, other: int, mod: None = None, /) -> int_: ...
|
|
3925
|
+
@overload
|
|
3926
|
+
def __pow__(self, other: float, mod: None = None, /) -> float64: ...
|
|
3927
|
+
@overload
|
|
3928
|
+
def __pow__(self, other: complex, mod: None = None, /) -> complex128: ...
|
|
3929
|
+
|
|
3930
|
+
@overload
|
|
3931
|
+
def __rpow__(self, other: _NumberT, mod: None = None, /) -> _NumberT: ...
|
|
3932
|
+
@overload
|
|
3933
|
+
def __rpow__(self, other: builtins.bool, mod: None = None, /) -> int8: ...
|
|
3934
|
+
@overload
|
|
3935
|
+
def __rpow__(self, other: int, mod: None = None, /) -> int_: ...
|
|
3936
|
+
@overload
|
|
3937
|
+
def __rpow__(self, other: float, mod: None = None, /) -> float64: ...
|
|
3938
|
+
@overload
|
|
3939
|
+
def __rpow__(self, other: complex, mod: None = None, /) -> complex128: ...
|
|
3940
|
+
|
|
3941
|
+
@overload
|
|
3942
|
+
def __truediv__(self, other: _InexactT, /) -> _InexactT: ...
|
|
3943
|
+
@overload
|
|
3944
|
+
def __truediv__(self, other: float | integer | bool_, /) -> float64: ...
|
|
3945
|
+
@overload
|
|
3946
|
+
def __truediv__(self, other: complex, /) -> complex128: ...
|
|
3947
|
+
|
|
3948
|
+
@overload
|
|
3949
|
+
def __rtruediv__(self, other: _InexactT, /) -> _InexactT: ...
|
|
3950
|
+
@overload
|
|
3951
|
+
def __rtruediv__(self, other: float | integer, /) -> float64: ...
|
|
3952
|
+
@overload
|
|
3953
|
+
def __rtruediv__(self, other: complex, /) -> complex128: ...
|
|
3954
|
+
|
|
3955
|
+
@overload
|
|
3956
|
+
def __floordiv__(self, other: _RealNumberT, /) -> _RealNumberT: ...
|
|
3957
|
+
@overload
|
|
3958
|
+
def __floordiv__(self, other: builtins.bool | bool_, /) -> int8: ...
|
|
3959
|
+
@overload
|
|
3960
|
+
def __floordiv__(self, other: int, /) -> int_: ...
|
|
3961
|
+
@overload
|
|
3962
|
+
def __floordiv__(self, other: float, /) -> float64: ...
|
|
3963
|
+
|
|
3964
|
+
@overload
|
|
3965
|
+
def __rfloordiv__(self, other: _RealNumberT, /) -> _RealNumberT: ...
|
|
3966
|
+
@overload
|
|
3967
|
+
def __rfloordiv__(self, other: builtins.bool, /) -> int8: ...
|
|
3968
|
+
@overload
|
|
3969
|
+
def __rfloordiv__(self, other: int, /) -> int_: ...
|
|
3970
|
+
@overload
|
|
3971
|
+
def __rfloordiv__(self, other: float, /) -> float64: ...
|
|
3972
|
+
|
|
3973
|
+
# keep in sync with __floordiv__
|
|
3974
|
+
@overload
|
|
3975
|
+
def __mod__(self, other: _RealNumberT, /) -> _RealNumberT: ...
|
|
3976
|
+
@overload
|
|
3977
|
+
def __mod__(self, other: builtins.bool | bool_, /) -> int8: ...
|
|
3978
|
+
@overload
|
|
3979
|
+
def __mod__(self, other: int, /) -> int_: ...
|
|
3980
|
+
@overload
|
|
3981
|
+
def __mod__(self, other: float, /) -> float64: ...
|
|
3982
|
+
|
|
3983
|
+
# keep in sync with __rfloordiv__
|
|
3984
|
+
@overload
|
|
3985
|
+
def __rmod__(self, other: _RealNumberT, /) -> _RealNumberT: ...
|
|
3986
|
+
@overload
|
|
3987
|
+
def __rmod__(self, other: builtins.bool, /) -> int8: ...
|
|
3988
|
+
@overload
|
|
3989
|
+
def __rmod__(self, other: int, /) -> int_: ...
|
|
3990
|
+
@overload
|
|
3991
|
+
def __rmod__(self, other: float, /) -> float64: ...
|
|
3992
|
+
|
|
3993
|
+
# keep in sync with __mod__
|
|
3994
|
+
@overload
|
|
3995
|
+
def __divmod__(self, other: _RealNumberT, /) -> _2Tuple[_RealNumberT]: ...
|
|
3996
|
+
@overload
|
|
3997
|
+
def __divmod__(self, other: builtins.bool | bool_, /) -> _2Tuple[int8]: ...
|
|
3998
|
+
@overload
|
|
3999
|
+
def __divmod__(self, other: int, /) -> _2Tuple[int_]: ...
|
|
4000
|
+
@overload
|
|
4001
|
+
def __divmod__(self, other: float, /) -> _2Tuple[float64]: ...
|
|
4002
|
+
|
|
4003
|
+
# keep in sync with __rmod__
|
|
4004
|
+
@overload
|
|
4005
|
+
def __rdivmod__(self, other: _RealNumberT, /) -> _2Tuple[_RealNumberT]: ...
|
|
4006
|
+
@overload
|
|
4007
|
+
def __rdivmod__(self, other: builtins.bool, /) -> _2Tuple[int8]: ...
|
|
4008
|
+
@overload
|
|
4009
|
+
def __rdivmod__(self, other: int, /) -> _2Tuple[int_]: ...
|
|
4010
|
+
@overload
|
|
4011
|
+
def __rdivmod__(self, other: float, /) -> _2Tuple[float64]: ...
|
|
4012
|
+
|
|
4013
|
+
@overload
|
|
4014
|
+
def __lshift__(self, other: _IntegerT, /) -> _IntegerT: ...
|
|
4015
|
+
@overload
|
|
4016
|
+
def __lshift__(self, other: builtins.bool | bool_, /) -> int8: ...
|
|
4017
|
+
@overload
|
|
4018
|
+
def __lshift__(self, other: int, /) -> int_: ...
|
|
4019
|
+
|
|
4020
|
+
@overload
|
|
4021
|
+
def __rlshift__(self, other: _IntegerT, /) -> _IntegerT: ...
|
|
4022
|
+
@overload
|
|
4023
|
+
def __rlshift__(self, other: builtins.bool, /) -> int8: ...
|
|
4024
|
+
@overload
|
|
4025
|
+
def __rlshift__(self, other: int, /) -> int_: ...
|
|
4026
|
+
|
|
4027
|
+
# keep in sync with __lshift__
|
|
4028
|
+
@overload
|
|
4029
|
+
def __rshift__(self, other: _IntegerT, /) -> _IntegerT: ...
|
|
4030
|
+
@overload
|
|
4031
|
+
def __rshift__(self, other: builtins.bool | bool_, /) -> int8: ...
|
|
4032
|
+
@overload
|
|
4033
|
+
def __rshift__(self, other: int, /) -> int_: ...
|
|
4034
|
+
|
|
4035
|
+
# keep in sync with __rlshift__
|
|
4036
|
+
@overload
|
|
4037
|
+
def __rrshift__(self, other: _IntegerT, /) -> _IntegerT: ...
|
|
4038
|
+
@overload
|
|
4039
|
+
def __rrshift__(self, other: builtins.bool, /) -> int8: ...
|
|
4040
|
+
@overload
|
|
4041
|
+
def __rrshift__(self, other: int, /) -> int_: ...
|
|
3859
4042
|
|
|
3860
4043
|
@overload
|
|
3861
4044
|
def __and__(self: np.bool[L[False]], other: builtins.bool | np.bool, /) -> np.bool[L[False]]: ...
|
|
@@ -3899,15 +4082,33 @@ class bool(generic[_BoolItemT_co], Generic[_BoolItemT_co]):
|
|
|
3899
4082
|
def __or__(self, other: int, /) -> np.bool | intp: ...
|
|
3900
4083
|
__ror__ = __or__
|
|
3901
4084
|
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
4085
|
+
@overload
|
|
4086
|
+
def __lt__(self, other: _NumberLike_co, /) -> bool_: ...
|
|
4087
|
+
@overload
|
|
4088
|
+
def __lt__(self, other: _ArrayLikeNumber_co | _NestedSequence[_SupportsGT], /) -> NDArray[bool_]: ...
|
|
4089
|
+
@overload
|
|
4090
|
+
def __lt__(self, other: _SupportsGT, /) -> bool_: ...
|
|
4091
|
+
|
|
4092
|
+
@overload
|
|
4093
|
+
def __le__(self, other: _NumberLike_co, /) -> bool_: ...
|
|
4094
|
+
@overload
|
|
4095
|
+
def __le__(self, other: _ArrayLikeNumber_co | _NestedSequence[_SupportsGE], /) -> NDArray[bool_]: ...
|
|
4096
|
+
@overload
|
|
4097
|
+
def __le__(self, other: _SupportsGE, /) -> bool_: ...
|
|
4098
|
+
|
|
4099
|
+
@overload
|
|
4100
|
+
def __gt__(self, other: _NumberLike_co, /) -> bool_: ...
|
|
4101
|
+
@overload
|
|
4102
|
+
def __gt__(self, other: _ArrayLikeNumber_co | _NestedSequence[_SupportsLT], /) -> NDArray[bool_]: ...
|
|
4103
|
+
@overload
|
|
4104
|
+
def __gt__(self, other: _SupportsLT, /) -> bool_: ...
|
|
3906
4105
|
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
__ge__:
|
|
4106
|
+
@overload
|
|
4107
|
+
def __ge__(self, other: _NumberLike_co, /) -> bool_: ...
|
|
4108
|
+
@overload
|
|
4109
|
+
def __ge__(self, other: _ArrayLikeNumber_co | _NestedSequence[_SupportsLE], /) -> NDArray[bool_]: ...
|
|
4110
|
+
@overload
|
|
4111
|
+
def __ge__(self, other: _SupportsLE, /) -> bool_: ...
|
|
3911
4112
|
|
|
3912
4113
|
# NOTE: This should _not_ be `Final` or a `TypeAlias`
|
|
3913
4114
|
bool_ = bool
|
|
@@ -3930,7 +4131,7 @@ class object_(_RealMixin, generic):
|
|
|
3930
4131
|
def __new__(cls, value: _T, /) -> _T: ... # type: ignore[misc]
|
|
3931
4132
|
@overload # catch-all
|
|
3932
4133
|
def __new__(cls, value: Any = ..., /) -> object | NDArray[Self]: ... # type: ignore[misc]
|
|
3933
|
-
|
|
4134
|
+
|
|
3934
4135
|
def __hash__(self, /) -> int: ...
|
|
3935
4136
|
def __abs__(self, /) -> object_: ... # this affects NDArray[object_].__abs__
|
|
3936
4137
|
def __call__(self, /, *args: object, **kwargs: object) -> Any: ...
|
|
@@ -3940,17 +4141,32 @@ class object_(_RealMixin, generic):
|
|
|
3940
4141
|
|
|
3941
4142
|
class integer(_IntegralMixin, _RoundMixin, number[_NBit, int]):
|
|
3942
4143
|
@abstractmethod
|
|
3943
|
-
def
|
|
4144
|
+
def __new__(cls) -> Self: ...
|
|
3944
4145
|
|
|
3945
4146
|
# NOTE: `bit_count` and `__index__` are technically defined in the concrete subtypes
|
|
3946
4147
|
def bit_count(self, /) -> int: ...
|
|
3947
4148
|
def __index__(self, /) -> int: ...
|
|
3948
4149
|
def __invert__(self, /) -> Self: ...
|
|
3949
4150
|
|
|
3950
|
-
|
|
3951
|
-
|
|
4151
|
+
@override # type: ignore[override]
|
|
4152
|
+
@overload
|
|
4153
|
+
def __truediv__(self, other: float | integer, /) -> float64: ...
|
|
4154
|
+
@overload
|
|
4155
|
+
def __truediv__(self, other: complex, /) -> complex128: ...
|
|
4156
|
+
|
|
4157
|
+
@override # type: ignore[override]
|
|
4158
|
+
@overload
|
|
4159
|
+
def __rtruediv__(self, other: float | integer, /) -> float64: ...
|
|
4160
|
+
@overload
|
|
4161
|
+
def __rtruediv__(self, other: complex, /) -> complex128: ...
|
|
4162
|
+
|
|
4163
|
+
def __floordiv__(self, value: _IntLike_co, /) -> integer: ...
|
|
4164
|
+
def __rfloordiv__(self, value: _IntLike_co, /) -> integer: ...
|
|
3952
4165
|
def __mod__(self, value: _IntLike_co, /) -> integer: ...
|
|
3953
4166
|
def __rmod__(self, value: _IntLike_co, /) -> integer: ...
|
|
4167
|
+
def __divmod__(self, value: _IntLike_co, /) -> _2Tuple[integer]: ...
|
|
4168
|
+
def __rdivmod__(self, value: _IntLike_co, /) -> _2Tuple[integer]: ...
|
|
4169
|
+
|
|
3954
4170
|
# Ensure that objects annotated as `integer` support bit-wise operations
|
|
3955
4171
|
def __lshift__(self, other: _IntLike_co, /) -> integer: ...
|
|
3956
4172
|
def __rlshift__(self, other: _IntLike_co, /) -> integer: ...
|
|
@@ -3963,212 +4179,751 @@ class integer(_IntegralMixin, _RoundMixin, number[_NBit, int]):
|
|
|
3963
4179
|
def __xor__(self, other: _IntLike_co, /) -> integer: ...
|
|
3964
4180
|
def __rxor__(self, other: _IntLike_co, /) -> integer: ...
|
|
3965
4181
|
|
|
3966
|
-
class signedinteger(integer[
|
|
3967
|
-
def
|
|
3968
|
-
|
|
3969
|
-
__add__: _SignedIntOp[_NBit1]
|
|
3970
|
-
__radd__: _SignedIntOp[_NBit1]
|
|
3971
|
-
__sub__: _SignedIntOp[_NBit1]
|
|
3972
|
-
__rsub__: _SignedIntOp[_NBit1]
|
|
3973
|
-
__mul__: _SignedIntOp[_NBit1]
|
|
3974
|
-
__rmul__: _SignedIntOp[_NBit1]
|
|
3975
|
-
__floordiv__: _SignedIntOp[_NBit1]
|
|
3976
|
-
__rfloordiv__: _SignedIntOp[_NBit1]
|
|
3977
|
-
__pow__: _SignedIntOp[_NBit1]
|
|
3978
|
-
__rpow__: _SignedIntOp[_NBit1]
|
|
3979
|
-
__lshift__: _SignedIntBitOp[_NBit1]
|
|
3980
|
-
__rlshift__: _SignedIntBitOp[_NBit1]
|
|
3981
|
-
__rshift__: _SignedIntBitOp[_NBit1]
|
|
3982
|
-
__rrshift__: _SignedIntBitOp[_NBit1]
|
|
3983
|
-
__and__: _SignedIntBitOp[_NBit1]
|
|
3984
|
-
__rand__: _SignedIntBitOp[_NBit1]
|
|
3985
|
-
__xor__: _SignedIntBitOp[_NBit1]
|
|
3986
|
-
__rxor__: _SignedIntBitOp[_NBit1]
|
|
3987
|
-
__or__: _SignedIntBitOp[_NBit1]
|
|
3988
|
-
__ror__: _SignedIntBitOp[_NBit1]
|
|
3989
|
-
__mod__: _SignedIntMod[_NBit1]
|
|
3990
|
-
__rmod__: _SignedIntMod[_NBit1]
|
|
3991
|
-
__divmod__: _SignedIntDivMod[_NBit1]
|
|
3992
|
-
__rdivmod__: _SignedIntDivMod[_NBit1]
|
|
3993
|
-
|
|
3994
|
-
int8 = signedinteger[_8Bit]
|
|
3995
|
-
int16 = signedinteger[_16Bit]
|
|
3996
|
-
int32 = signedinteger[_32Bit]
|
|
3997
|
-
int64 = signedinteger[_64Bit]
|
|
3998
|
-
|
|
3999
|
-
byte = signedinteger[_NBitByte]
|
|
4000
|
-
short = signedinteger[_NBitShort]
|
|
4001
|
-
intc = signedinteger[_NBitIntC]
|
|
4002
|
-
intp = signedinteger[_NBitIntP]
|
|
4003
|
-
int_ = intp
|
|
4004
|
-
long = signedinteger[_NBitLong]
|
|
4005
|
-
longlong = signedinteger[_NBitLongLong]
|
|
4006
|
-
|
|
4007
|
-
class unsignedinteger(integer[_NBit1]):
|
|
4008
|
-
# NOTE: `uint64 + signedinteger -> float64`
|
|
4009
|
-
def __init__(self, value: _ConvertibleToInt = ..., /) -> None: ...
|
|
4010
|
-
|
|
4011
|
-
__add__: _UnsignedIntOp[_NBit1]
|
|
4012
|
-
__radd__: _UnsignedIntOp[_NBit1]
|
|
4013
|
-
__sub__: _UnsignedIntOp[_NBit1]
|
|
4014
|
-
__rsub__: _UnsignedIntOp[_NBit1]
|
|
4015
|
-
__mul__: _UnsignedIntOp[_NBit1]
|
|
4016
|
-
__rmul__: _UnsignedIntOp[_NBit1]
|
|
4017
|
-
__floordiv__: _UnsignedIntOp[_NBit1]
|
|
4018
|
-
__rfloordiv__: _UnsignedIntOp[_NBit1]
|
|
4019
|
-
__pow__: _UnsignedIntOp[_NBit1]
|
|
4020
|
-
__rpow__: _UnsignedIntOp[_NBit1]
|
|
4021
|
-
__lshift__: _UnsignedIntBitOp[_NBit1]
|
|
4022
|
-
__rlshift__: _UnsignedIntBitOp[_NBit1]
|
|
4023
|
-
__rshift__: _UnsignedIntBitOp[_NBit1]
|
|
4024
|
-
__rrshift__: _UnsignedIntBitOp[_NBit1]
|
|
4025
|
-
__and__: _UnsignedIntBitOp[_NBit1]
|
|
4026
|
-
__rand__: _UnsignedIntBitOp[_NBit1]
|
|
4027
|
-
__xor__: _UnsignedIntBitOp[_NBit1]
|
|
4028
|
-
__rxor__: _UnsignedIntBitOp[_NBit1]
|
|
4029
|
-
__or__: _UnsignedIntBitOp[_NBit1]
|
|
4030
|
-
__ror__: _UnsignedIntBitOp[_NBit1]
|
|
4031
|
-
__mod__: _UnsignedIntMod[_NBit1]
|
|
4032
|
-
__rmod__: _UnsignedIntMod[_NBit1]
|
|
4033
|
-
__divmod__: _UnsignedIntDivMod[_NBit1]
|
|
4034
|
-
__rdivmod__: _UnsignedIntDivMod[_NBit1]
|
|
4035
|
-
|
|
4036
|
-
uint8: TypeAlias = unsignedinteger[_8Bit]
|
|
4037
|
-
uint16: TypeAlias = unsignedinteger[_16Bit]
|
|
4038
|
-
uint32: TypeAlias = unsignedinteger[_32Bit]
|
|
4039
|
-
uint64: TypeAlias = unsignedinteger[_64Bit]
|
|
4040
|
-
|
|
4041
|
-
ubyte: TypeAlias = unsignedinteger[_NBitByte]
|
|
4042
|
-
ushort: TypeAlias = unsignedinteger[_NBitShort]
|
|
4043
|
-
uintc: TypeAlias = unsignedinteger[_NBitIntC]
|
|
4044
|
-
uintp: TypeAlias = unsignedinteger[_NBitIntP]
|
|
4045
|
-
uint: TypeAlias = uintp
|
|
4046
|
-
ulong: TypeAlias = unsignedinteger[_NBitLong]
|
|
4047
|
-
ulonglong: TypeAlias = unsignedinteger[_NBitLongLong]
|
|
4048
|
-
|
|
4049
|
-
class inexact(number[_NBit, _InexactItemT_co], Generic[_NBit, _InexactItemT_co]):
|
|
4050
|
-
@abstractmethod
|
|
4051
|
-
def __init__(self, value: _InexactItemT_co | None = ..., /) -> None: ...
|
|
4052
|
-
|
|
4053
|
-
class floating(_RealMixin, _RoundMixin, inexact[_NBit1, float]):
|
|
4054
|
-
def __init__(self, value: _ConvertibleToFloat | None = ..., /) -> None: ...
|
|
4055
|
-
|
|
4056
|
-
__add__: _FloatOp[_NBit1]
|
|
4057
|
-
__radd__: _FloatOp[_NBit1]
|
|
4058
|
-
__sub__: _FloatOp[_NBit1]
|
|
4059
|
-
__rsub__: _FloatOp[_NBit1]
|
|
4060
|
-
__mul__: _FloatOp[_NBit1]
|
|
4061
|
-
__rmul__: _FloatOp[_NBit1]
|
|
4062
|
-
__truediv__: _FloatOp[_NBit1]
|
|
4063
|
-
__rtruediv__: _FloatOp[_NBit1]
|
|
4064
|
-
__floordiv__: _FloatOp[_NBit1]
|
|
4065
|
-
__rfloordiv__: _FloatOp[_NBit1]
|
|
4066
|
-
__pow__: _FloatOp[_NBit1]
|
|
4067
|
-
__rpow__: _FloatOp[_NBit1]
|
|
4068
|
-
__mod__: _FloatMod[_NBit1]
|
|
4069
|
-
__rmod__: _FloatMod[_NBit1]
|
|
4070
|
-
__divmod__: _FloatDivMod[_NBit1]
|
|
4071
|
-
__rdivmod__: _FloatDivMod[_NBit1]
|
|
4072
|
-
|
|
4073
|
-
# NOTE: `is_integer` and `as_integer_ratio` are technically defined in the concrete subtypes
|
|
4074
|
-
def is_integer(self, /) -> builtins.bool: ...
|
|
4075
|
-
def as_integer_ratio(self, /) -> tuple[int, int]: ...
|
|
4076
|
-
|
|
4077
|
-
float16: TypeAlias = floating[_16Bit]
|
|
4078
|
-
float32: TypeAlias = floating[_32Bit]
|
|
4079
|
-
|
|
4080
|
-
# either a C `double`, `float`, or `longdouble`
|
|
4081
|
-
class float64(floating[_64Bit], float): # type: ignore[misc]
|
|
4082
|
-
def __new__(cls, x: _ConvertibleToFloat | None = ..., /) -> Self: ...
|
|
4083
|
-
|
|
4084
|
-
#
|
|
4085
|
-
@property
|
|
4086
|
-
def itemsize(self) -> L[8]: ...
|
|
4087
|
-
@property
|
|
4088
|
-
def nbytes(self) -> L[8]: ...
|
|
4182
|
+
class signedinteger(integer[_NBit]):
|
|
4183
|
+
def __new__(cls, value: _ConvertibleToInt = 0, /) -> Self: ...
|
|
4089
4184
|
|
|
4090
|
-
#
|
|
4091
|
-
@property
|
|
4092
|
-
def real(self) -> Self: ...
|
|
4093
|
-
@property
|
|
4094
|
-
def imag(self) -> Self: ...
|
|
4095
|
-
def conjugate(self) -> Self: ...
|
|
4096
|
-
def __getformat__(self, typestr: L["double", "float"], /) -> str: ...
|
|
4097
|
-
def __getnewargs__(self, /) -> tuple[float]: ...
|
|
4185
|
+
# arithmetic ops
|
|
4098
4186
|
|
|
4099
|
-
#
|
|
4100
|
-
@overload
|
|
4101
|
-
def __add__(self, other: _Float64_co, /) -> float64: ...
|
|
4187
|
+
@override # type: ignore[override]
|
|
4102
4188
|
@overload
|
|
4103
|
-
def __add__(self, other:
|
|
4189
|
+
def __add__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4104
4190
|
@overload
|
|
4105
|
-
def __add__(self, other:
|
|
4191
|
+
def __add__(self, other: float, /) -> float64: ...
|
|
4106
4192
|
@overload
|
|
4107
|
-
def __add__(self, other: complex, /) ->
|
|
4193
|
+
def __add__(self, other: complex, /) -> complex128: ...
|
|
4108
4194
|
@overload
|
|
4109
|
-
def
|
|
4195
|
+
def __add__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4110
4196
|
@overload
|
|
4111
|
-
def
|
|
4197
|
+
def __add__(self, other: integer, /) -> Incomplete: ...
|
|
4198
|
+
|
|
4199
|
+
@override # type: ignore[override]
|
|
4112
4200
|
@overload
|
|
4113
|
-
def __radd__(self, other:
|
|
4201
|
+
def __radd__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4114
4202
|
@overload
|
|
4115
|
-
def __radd__(self, other:
|
|
4116
|
-
|
|
4203
|
+
def __radd__(self, other: float, /) -> float64: ...
|
|
4117
4204
|
@overload
|
|
4118
|
-
def
|
|
4205
|
+
def __radd__(self, other: complex, /) -> complex128: ...
|
|
4119
4206
|
@overload
|
|
4120
|
-
def
|
|
4207
|
+
def __radd__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4121
4208
|
@overload
|
|
4122
|
-
def
|
|
4209
|
+
def __radd__(self, other: integer, /) -> Incomplete: ...
|
|
4210
|
+
|
|
4211
|
+
@override # type: ignore[override]
|
|
4123
4212
|
@overload
|
|
4124
|
-
def __sub__(self, other:
|
|
4213
|
+
def __sub__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4125
4214
|
@overload
|
|
4126
|
-
def
|
|
4215
|
+
def __sub__(self, other: float, /) -> float64: ...
|
|
4127
4216
|
@overload
|
|
4128
|
-
def
|
|
4217
|
+
def __sub__(self, other: complex, /) -> complex128: ...
|
|
4129
4218
|
@overload
|
|
4130
|
-
def
|
|
4219
|
+
def __sub__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4131
4220
|
@overload
|
|
4132
|
-
def
|
|
4221
|
+
def __sub__(self, other: integer, /) -> Incomplete: ...
|
|
4133
4222
|
|
|
4223
|
+
@override # type: ignore[override]
|
|
4134
4224
|
@overload
|
|
4135
|
-
def
|
|
4136
|
-
@overload
|
|
4137
|
-
def __mul__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4225
|
+
def __rsub__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4138
4226
|
@overload
|
|
4139
|
-
def
|
|
4227
|
+
def __rsub__(self, other: float, /) -> float64: ...
|
|
4140
4228
|
@overload
|
|
4141
|
-
def
|
|
4229
|
+
def __rsub__(self, other: complex, /) -> complex128: ...
|
|
4142
4230
|
@overload
|
|
4143
|
-
def
|
|
4231
|
+
def __rsub__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4144
4232
|
@overload
|
|
4145
|
-
def
|
|
4233
|
+
def __rsub__(self, other: integer, /) -> Incomplete: ...
|
|
4234
|
+
|
|
4235
|
+
@override # type: ignore[override]
|
|
4146
4236
|
@overload
|
|
4147
|
-
def
|
|
4237
|
+
def __mul__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4148
4238
|
@overload
|
|
4149
|
-
def
|
|
4150
|
-
|
|
4239
|
+
def __mul__(self, other: float, /) -> float64: ...
|
|
4151
4240
|
@overload
|
|
4152
|
-
def
|
|
4241
|
+
def __mul__(self, other: complex, /) -> complex128: ...
|
|
4153
4242
|
@overload
|
|
4154
|
-
def
|
|
4243
|
+
def __mul__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4155
4244
|
@overload
|
|
4156
|
-
def
|
|
4245
|
+
def __mul__(self, other: integer, /) -> Incomplete: ...
|
|
4246
|
+
|
|
4247
|
+
@override # type: ignore[override]
|
|
4157
4248
|
@overload
|
|
4158
|
-
def
|
|
4249
|
+
def __rmul__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4159
4250
|
@overload
|
|
4160
|
-
def
|
|
4251
|
+
def __rmul__(self, other: float, /) -> float64: ...
|
|
4161
4252
|
@overload
|
|
4162
|
-
def
|
|
4253
|
+
def __rmul__(self, other: complex, /) -> complex128: ...
|
|
4163
4254
|
@overload
|
|
4164
|
-
def
|
|
4255
|
+
def __rmul__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4165
4256
|
@overload
|
|
4166
|
-
def
|
|
4257
|
+
def __rmul__(self, other: integer, /) -> Incomplete: ...
|
|
4167
4258
|
|
|
4259
|
+
@override # type: ignore[override]
|
|
4168
4260
|
@overload
|
|
4169
|
-
def
|
|
4261
|
+
def __pow__(self, other: int | int8 | bool_ | Self, mod: None = None, /) -> Self: ...
|
|
4170
4262
|
@overload
|
|
4171
|
-
def
|
|
4263
|
+
def __pow__(self, other: float, mod: None = None, /) -> float64: ...
|
|
4264
|
+
@overload
|
|
4265
|
+
def __pow__(self, other: complex, mod: None = None, /) -> complex128: ...
|
|
4266
|
+
@overload
|
|
4267
|
+
def __pow__(self, other: signedinteger, mod: None = None, /) -> signedinteger: ...
|
|
4268
|
+
@overload
|
|
4269
|
+
def __pow__(self, other: integer, mod: None = None, /) -> Incomplete: ...
|
|
4270
|
+
|
|
4271
|
+
@override # type: ignore[override]
|
|
4272
|
+
@overload
|
|
4273
|
+
def __rpow__(self, other: int | int8 | bool_, mod: None = None, /) -> Self: ...
|
|
4274
|
+
@overload
|
|
4275
|
+
def __rpow__(self, other: float, mod: None = None, /) -> float64: ...
|
|
4276
|
+
@overload
|
|
4277
|
+
def __rpow__(self, other: complex, mod: None = None, /) -> complex128: ...
|
|
4278
|
+
@overload
|
|
4279
|
+
def __rpow__(self, other: signedinteger, mod: None = None, /) -> signedinteger: ...
|
|
4280
|
+
@overload
|
|
4281
|
+
def __rpow__(self, other: integer, mod: None = None, /) -> Incomplete: ...
|
|
4282
|
+
|
|
4283
|
+
# modular division ops
|
|
4284
|
+
|
|
4285
|
+
@override # type: ignore[override]
|
|
4286
|
+
@overload
|
|
4287
|
+
def __floordiv__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4288
|
+
@overload
|
|
4289
|
+
def __floordiv__(self, other: float, /) -> float64: ...
|
|
4290
|
+
@overload
|
|
4291
|
+
def __floordiv__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4292
|
+
@overload
|
|
4293
|
+
def __floordiv__(self, other: integer, /) -> Incomplete: ...
|
|
4294
|
+
|
|
4295
|
+
@override # type: ignore[override]
|
|
4296
|
+
@overload
|
|
4297
|
+
def __rfloordiv__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4298
|
+
@overload
|
|
4299
|
+
def __rfloordiv__(self, other: float, /) -> float64: ...
|
|
4300
|
+
@overload
|
|
4301
|
+
def __rfloordiv__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4302
|
+
@overload
|
|
4303
|
+
def __rfloordiv__(self, other: integer, /) -> Incomplete: ...
|
|
4304
|
+
|
|
4305
|
+
@override # type: ignore[override]
|
|
4306
|
+
@overload
|
|
4307
|
+
def __mod__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4308
|
+
@overload
|
|
4309
|
+
def __mod__(self, other: float, /) -> float64: ...
|
|
4310
|
+
@overload
|
|
4311
|
+
def __mod__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4312
|
+
@overload
|
|
4313
|
+
def __mod__(self, other: integer, /) -> Incomplete: ...
|
|
4314
|
+
|
|
4315
|
+
@override # type: ignore[override]
|
|
4316
|
+
@overload
|
|
4317
|
+
def __rmod__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4318
|
+
@overload
|
|
4319
|
+
def __rmod__(self, other: float, /) -> float64: ...
|
|
4320
|
+
@overload
|
|
4321
|
+
def __rmod__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4322
|
+
@overload
|
|
4323
|
+
def __rmod__(self, other: integer, /) -> Incomplete: ...
|
|
4324
|
+
|
|
4325
|
+
@override # type: ignore[override]
|
|
4326
|
+
@overload
|
|
4327
|
+
def __divmod__(self, other: int | int8 | bool_ | Self, /) -> _2Tuple[Self]: ...
|
|
4328
|
+
@overload
|
|
4329
|
+
def __divmod__(self, other: float, /) -> _2Tuple[float64]: ...
|
|
4330
|
+
@overload
|
|
4331
|
+
def __divmod__(self, other: signedinteger, /) -> _2Tuple[signedinteger]: ...
|
|
4332
|
+
@overload
|
|
4333
|
+
def __divmod__(self, other: integer, /) -> _2Tuple[Incomplete]: ...
|
|
4334
|
+
|
|
4335
|
+
@override # type: ignore[override]
|
|
4336
|
+
@overload
|
|
4337
|
+
def __rdivmod__(self, other: int | int8 | bool_, /) -> _2Tuple[Self]: ...
|
|
4338
|
+
@overload
|
|
4339
|
+
def __rdivmod__(self, other: float, /) -> _2Tuple[float64]: ...
|
|
4340
|
+
@overload
|
|
4341
|
+
def __rdivmod__(self, other: signedinteger, /) -> _2Tuple[signedinteger]: ...
|
|
4342
|
+
@overload
|
|
4343
|
+
def __rdivmod__(self, other: integer, /) -> _2Tuple[Incomplete]: ...
|
|
4344
|
+
|
|
4345
|
+
# bitwise ops
|
|
4346
|
+
|
|
4347
|
+
@override # type: ignore[override]
|
|
4348
|
+
@overload
|
|
4349
|
+
def __lshift__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4350
|
+
@overload
|
|
4351
|
+
def __lshift__(self, other: integer, /) -> signedinteger: ...
|
|
4352
|
+
|
|
4353
|
+
@override # type: ignore[override]
|
|
4354
|
+
@overload
|
|
4355
|
+
def __rlshift__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4356
|
+
@overload
|
|
4357
|
+
def __rlshift__(self, other: integer, /) -> signedinteger: ...
|
|
4358
|
+
|
|
4359
|
+
@override # type: ignore[override]
|
|
4360
|
+
@overload
|
|
4361
|
+
def __rshift__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4362
|
+
@overload
|
|
4363
|
+
def __rshift__(self, other: integer, /) -> signedinteger: ...
|
|
4364
|
+
|
|
4365
|
+
@override # type: ignore[override]
|
|
4366
|
+
@overload
|
|
4367
|
+
def __rrshift__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4368
|
+
@overload
|
|
4369
|
+
def __rrshift__(self, other: integer, /) -> signedinteger: ...
|
|
4370
|
+
|
|
4371
|
+
@override # type: ignore[override]
|
|
4372
|
+
@overload
|
|
4373
|
+
def __and__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4374
|
+
@overload
|
|
4375
|
+
def __and__(self, other: integer, /) -> signedinteger: ...
|
|
4376
|
+
|
|
4377
|
+
@override # type: ignore[override]
|
|
4378
|
+
@overload
|
|
4379
|
+
def __rand__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4380
|
+
@overload
|
|
4381
|
+
def __rand__(self, other: integer, /) -> signedinteger: ...
|
|
4382
|
+
|
|
4383
|
+
@override # type: ignore[override]
|
|
4384
|
+
@overload
|
|
4385
|
+
def __xor__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4386
|
+
@overload
|
|
4387
|
+
def __xor__(self, other: integer, /) -> signedinteger: ...
|
|
4388
|
+
|
|
4389
|
+
@override # type: ignore[override]
|
|
4390
|
+
@overload
|
|
4391
|
+
def __rxor__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4392
|
+
@overload
|
|
4393
|
+
def __rxor__(self, other: integer, /) -> signedinteger: ...
|
|
4394
|
+
|
|
4395
|
+
@override # type: ignore[override]
|
|
4396
|
+
@overload
|
|
4397
|
+
def __or__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4398
|
+
@overload
|
|
4399
|
+
def __or__(self, other: integer, /) -> signedinteger: ...
|
|
4400
|
+
|
|
4401
|
+
@override # type: ignore[override]
|
|
4402
|
+
@overload
|
|
4403
|
+
def __ror__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4404
|
+
@overload
|
|
4405
|
+
def __ror__(self, other: integer, /) -> signedinteger: ...
|
|
4406
|
+
|
|
4407
|
+
int8 = signedinteger[_8Bit]
|
|
4408
|
+
int16 = signedinteger[_16Bit]
|
|
4409
|
+
int32 = signedinteger[_32Bit]
|
|
4410
|
+
int64 = signedinteger[_64Bit]
|
|
4411
|
+
|
|
4412
|
+
byte = signedinteger[_NBitByte]
|
|
4413
|
+
short = signedinteger[_NBitShort]
|
|
4414
|
+
intc = signedinteger[_NBitIntC]
|
|
4415
|
+
intp = signedinteger[_NBitIntP]
|
|
4416
|
+
int_ = intp
|
|
4417
|
+
long = signedinteger[_NBitLong]
|
|
4418
|
+
longlong = signedinteger[_NBitLongLong]
|
|
4419
|
+
|
|
4420
|
+
class unsignedinteger(integer[_NBit1]):
|
|
4421
|
+
def __new__(cls, value: _ConvertibleToInt = 0, /) -> Self: ...
|
|
4422
|
+
|
|
4423
|
+
# arithmetic ops
|
|
4424
|
+
|
|
4425
|
+
@override # type: ignore[override]
|
|
4426
|
+
@overload
|
|
4427
|
+
def __add__(self, other: int | uint8 | bool_ | Self, /) -> Self: ...
|
|
4428
|
+
@overload
|
|
4429
|
+
def __add__(self, other: float, /) -> float64: ...
|
|
4430
|
+
@overload
|
|
4431
|
+
def __add__(self, other: complex, /) -> complex128: ...
|
|
4432
|
+
@overload
|
|
4433
|
+
def __add__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4434
|
+
@overload
|
|
4435
|
+
def __add__(self, other: integer, /) -> Incomplete: ...
|
|
4436
|
+
|
|
4437
|
+
@override # type: ignore[override]
|
|
4438
|
+
@overload
|
|
4439
|
+
def __radd__(self, other: int | uint8 | bool_, /) -> Self: ...
|
|
4440
|
+
@overload
|
|
4441
|
+
def __radd__(self, other: float, /) -> float64: ...
|
|
4442
|
+
@overload
|
|
4443
|
+
def __radd__(self, other: complex, /) -> complex128: ...
|
|
4444
|
+
@overload
|
|
4445
|
+
def __radd__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4446
|
+
@overload
|
|
4447
|
+
def __radd__(self, other: integer, /) -> Incomplete: ...
|
|
4448
|
+
|
|
4449
|
+
@override # type: ignore[override]
|
|
4450
|
+
@overload
|
|
4451
|
+
def __sub__(self, other: int | uint8 | bool_ | Self, /) -> Self: ...
|
|
4452
|
+
@overload
|
|
4453
|
+
def __sub__(self, other: float, /) -> float64: ...
|
|
4454
|
+
@overload
|
|
4455
|
+
def __sub__(self, other: complex, /) -> complex128: ...
|
|
4456
|
+
@overload
|
|
4457
|
+
def __sub__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4458
|
+
@overload
|
|
4459
|
+
def __sub__(self, other: integer, /) -> Incomplete: ...
|
|
4460
|
+
|
|
4461
|
+
@override # type: ignore[override]
|
|
4462
|
+
@overload
|
|
4463
|
+
def __rsub__(self, other: int | uint8 | bool_, /) -> Self: ...
|
|
4464
|
+
@overload
|
|
4465
|
+
def __rsub__(self, other: float, /) -> float64: ...
|
|
4466
|
+
@overload
|
|
4467
|
+
def __rsub__(self, other: complex, /) -> complex128: ...
|
|
4468
|
+
@overload
|
|
4469
|
+
def __rsub__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4470
|
+
@overload
|
|
4471
|
+
def __rsub__(self, other: integer, /) -> Incomplete: ...
|
|
4472
|
+
|
|
4473
|
+
@override # type: ignore[override]
|
|
4474
|
+
@overload
|
|
4475
|
+
def __mul__(self, other: int | uint8 | bool_ | Self, /) -> Self: ...
|
|
4476
|
+
@overload
|
|
4477
|
+
def __mul__(self, other: float, /) -> float64: ...
|
|
4478
|
+
@overload
|
|
4479
|
+
def __mul__(self, other: complex, /) -> complex128: ...
|
|
4480
|
+
@overload
|
|
4481
|
+
def __mul__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4482
|
+
@overload
|
|
4483
|
+
def __mul__(self, other: integer, /) -> Incomplete: ...
|
|
4484
|
+
|
|
4485
|
+
@override # type: ignore[override]
|
|
4486
|
+
@overload
|
|
4487
|
+
def __rmul__(self, other: int | uint8 | bool_, /) -> Self: ...
|
|
4488
|
+
@overload
|
|
4489
|
+
def __rmul__(self, other: float, /) -> float64: ...
|
|
4490
|
+
@overload
|
|
4491
|
+
def __rmul__(self, other: complex, /) -> complex128: ...
|
|
4492
|
+
@overload
|
|
4493
|
+
def __rmul__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4494
|
+
@overload
|
|
4495
|
+
def __rmul__(self, other: integer, /) -> Incomplete: ...
|
|
4496
|
+
|
|
4497
|
+
@override # type: ignore[override]
|
|
4498
|
+
@overload
|
|
4499
|
+
def __pow__(self, other: int | uint8 | bool_ | Self, mod: None = None, /) -> Self: ...
|
|
4500
|
+
@overload
|
|
4501
|
+
def __pow__(self, other: float, mod: None = None, /) -> float64: ...
|
|
4502
|
+
@overload
|
|
4503
|
+
def __pow__(self, other: complex, mod: None = None, /) -> complex128: ...
|
|
4504
|
+
@overload
|
|
4505
|
+
def __pow__(self, other: unsignedinteger, mod: None = None, /) -> unsignedinteger: ...
|
|
4506
|
+
@overload
|
|
4507
|
+
def __pow__(self, other: integer, mod: None = None, /) -> Incomplete: ...
|
|
4508
|
+
|
|
4509
|
+
@override # type: ignore[override]
|
|
4510
|
+
@overload
|
|
4511
|
+
def __rpow__(self, other: int | uint8 | bool_, mod: None = None, /) -> Self: ...
|
|
4512
|
+
@overload
|
|
4513
|
+
def __rpow__(self, other: float, mod: None = None, /) -> float64: ...
|
|
4514
|
+
@overload
|
|
4515
|
+
def __rpow__(self, other: complex, mod: None = None, /) -> complex128: ...
|
|
4516
|
+
@overload
|
|
4517
|
+
def __rpow__(self, other: unsignedinteger, mod: None = None, /) -> unsignedinteger: ...
|
|
4518
|
+
@overload
|
|
4519
|
+
def __rpow__(self, other: integer, mod: None = None, /) -> Incomplete: ...
|
|
4520
|
+
|
|
4521
|
+
# modular division ops
|
|
4522
|
+
|
|
4523
|
+
@override # type: ignore[override]
|
|
4524
|
+
@overload
|
|
4525
|
+
def __floordiv__(self, other: int | uint8 | bool_ | Self, /) -> Self: ...
|
|
4526
|
+
@overload
|
|
4527
|
+
def __floordiv__(self, other: float, /) -> float64: ...
|
|
4528
|
+
@overload
|
|
4529
|
+
def __floordiv__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4530
|
+
@overload
|
|
4531
|
+
def __floordiv__(self, other: integer, /) -> Incomplete: ...
|
|
4532
|
+
|
|
4533
|
+
@override # type: ignore[override]
|
|
4534
|
+
@overload
|
|
4535
|
+
def __rfloordiv__(self, other: int | uint8 | bool_, /) -> Self: ...
|
|
4536
|
+
@overload
|
|
4537
|
+
def __rfloordiv__(self, other: float, /) -> float64: ...
|
|
4538
|
+
@overload
|
|
4539
|
+
def __rfloordiv__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4540
|
+
@overload
|
|
4541
|
+
def __rfloordiv__(self, other: integer, /) -> Incomplete: ...
|
|
4542
|
+
|
|
4543
|
+
@override # type: ignore[override]
|
|
4544
|
+
@overload
|
|
4545
|
+
def __mod__(self, other: int | uint8 | bool_ | Self, /) -> Self: ...
|
|
4546
|
+
@overload
|
|
4547
|
+
def __mod__(self, other: float, /) -> float64: ...
|
|
4548
|
+
@overload
|
|
4549
|
+
def __mod__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4550
|
+
@overload
|
|
4551
|
+
def __mod__(self, other: integer, /) -> Incomplete: ...
|
|
4552
|
+
|
|
4553
|
+
@override # type: ignore[override]
|
|
4554
|
+
@overload
|
|
4555
|
+
def __rmod__(self, other: int | uint8 | bool_, /) -> Self: ...
|
|
4556
|
+
@overload
|
|
4557
|
+
def __rmod__(self, other: float, /) -> float64: ...
|
|
4558
|
+
@overload
|
|
4559
|
+
def __rmod__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4560
|
+
@overload
|
|
4561
|
+
def __rmod__(self, other: integer, /) -> Incomplete: ...
|
|
4562
|
+
|
|
4563
|
+
@override # type: ignore[override]
|
|
4564
|
+
@overload
|
|
4565
|
+
def __divmod__(self, other: int | uint8 | bool_ | Self, /) -> _2Tuple[Self]: ...
|
|
4566
|
+
@overload
|
|
4567
|
+
def __divmod__(self, other: float, /) -> _2Tuple[float64]: ...
|
|
4568
|
+
@overload
|
|
4569
|
+
def __divmod__(self, other: unsignedinteger, /) -> _2Tuple[unsignedinteger]: ...
|
|
4570
|
+
@overload
|
|
4571
|
+
def __divmod__(self, other: integer, /) -> _2Tuple[Incomplete]: ...
|
|
4572
|
+
|
|
4573
|
+
@override # type: ignore[override]
|
|
4574
|
+
@overload
|
|
4575
|
+
def __rdivmod__(self, other: int | uint8 | bool_, /) -> _2Tuple[Self]: ...
|
|
4576
|
+
@overload
|
|
4577
|
+
def __rdivmod__(self, other: float, /) -> _2Tuple[float64]: ...
|
|
4578
|
+
@overload
|
|
4579
|
+
def __rdivmod__(self, other: unsignedinteger, /) -> _2Tuple[unsignedinteger]: ...
|
|
4580
|
+
@overload
|
|
4581
|
+
def __rdivmod__(self, other: integer, /) -> _2Tuple[Incomplete]: ...
|
|
4582
|
+
|
|
4583
|
+
# bitwise ops
|
|
4584
|
+
|
|
4585
|
+
@override # type: ignore[override]
|
|
4586
|
+
@overload
|
|
4587
|
+
def __lshift__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4588
|
+
@overload
|
|
4589
|
+
def __lshift__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4590
|
+
@overload
|
|
4591
|
+
def __lshift__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4592
|
+
|
|
4593
|
+
@override # type: ignore[override]
|
|
4594
|
+
@overload
|
|
4595
|
+
def __rlshift__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4596
|
+
@overload
|
|
4597
|
+
def __rlshift__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4598
|
+
@overload
|
|
4599
|
+
def __rlshift__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4600
|
+
|
|
4601
|
+
@override # type: ignore[override]
|
|
4602
|
+
@overload
|
|
4603
|
+
def __rshift__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4604
|
+
@overload
|
|
4605
|
+
def __rshift__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4606
|
+
@overload
|
|
4607
|
+
def __rshift__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4608
|
+
|
|
4609
|
+
@override # type: ignore[override]
|
|
4610
|
+
@overload
|
|
4611
|
+
def __rrshift__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4612
|
+
@overload
|
|
4613
|
+
def __rrshift__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4614
|
+
@overload
|
|
4615
|
+
def __rrshift__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4616
|
+
|
|
4617
|
+
@override # type: ignore[override]
|
|
4618
|
+
@overload
|
|
4619
|
+
def __and__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4620
|
+
@overload
|
|
4621
|
+
def __and__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4622
|
+
@overload
|
|
4623
|
+
def __and__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4624
|
+
|
|
4625
|
+
@override # type: ignore[override]
|
|
4626
|
+
@overload
|
|
4627
|
+
def __rand__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4628
|
+
@overload
|
|
4629
|
+
def __rand__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4630
|
+
@overload
|
|
4631
|
+
def __rand__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4632
|
+
|
|
4633
|
+
@override # type: ignore[override]
|
|
4634
|
+
@overload
|
|
4635
|
+
def __xor__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4636
|
+
@overload
|
|
4637
|
+
def __xor__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4638
|
+
@overload
|
|
4639
|
+
def __xor__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4640
|
+
|
|
4641
|
+
@override # type: ignore[override]
|
|
4642
|
+
@overload
|
|
4643
|
+
def __rxor__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4644
|
+
@overload
|
|
4645
|
+
def __rxor__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4646
|
+
@overload
|
|
4647
|
+
def __rxor__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4648
|
+
|
|
4649
|
+
@override # type: ignore[override]
|
|
4650
|
+
@overload
|
|
4651
|
+
def __or__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
|
|
4652
|
+
@overload
|
|
4653
|
+
def __or__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4654
|
+
@overload
|
|
4655
|
+
def __or__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4656
|
+
|
|
4657
|
+
@override # type: ignore[override]
|
|
4658
|
+
@overload
|
|
4659
|
+
def __ror__(self, other: int | int8 | bool_, /) -> Self: ...
|
|
4660
|
+
@overload
|
|
4661
|
+
def __ror__(self, other: unsignedinteger, /) -> unsignedinteger: ...
|
|
4662
|
+
@overload
|
|
4663
|
+
def __ror__(self, other: signedinteger, /) -> signedinteger: ...
|
|
4664
|
+
|
|
4665
|
+
uint8: TypeAlias = unsignedinteger[_8Bit]
|
|
4666
|
+
uint16: TypeAlias = unsignedinteger[_16Bit]
|
|
4667
|
+
uint32: TypeAlias = unsignedinteger[_32Bit]
|
|
4668
|
+
uint64: TypeAlias = unsignedinteger[_64Bit]
|
|
4669
|
+
|
|
4670
|
+
ubyte: TypeAlias = unsignedinteger[_NBitByte]
|
|
4671
|
+
ushort: TypeAlias = unsignedinteger[_NBitShort]
|
|
4672
|
+
uintc: TypeAlias = unsignedinteger[_NBitIntC]
|
|
4673
|
+
uintp: TypeAlias = unsignedinteger[_NBitIntP]
|
|
4674
|
+
uint: TypeAlias = uintp
|
|
4675
|
+
ulong: TypeAlias = unsignedinteger[_NBitLong]
|
|
4676
|
+
ulonglong: TypeAlias = unsignedinteger[_NBitLongLong]
|
|
4677
|
+
|
|
4678
|
+
class inexact(number[_NBit, _InexactItemT_co], Generic[_NBit, _InexactItemT_co]):
|
|
4679
|
+
@abstractmethod
|
|
4680
|
+
def __new__(cls) -> Self: ...
|
|
4681
|
+
|
|
4682
|
+
class floating(_RealMixin, _RoundMixin, inexact[_NBit1, float]):
|
|
4683
|
+
def __new__(cls, value: _ConvertibleToFloat | None = 0, /) -> Self: ...
|
|
4684
|
+
|
|
4685
|
+
# arithmetic ops
|
|
4686
|
+
|
|
4687
|
+
@override # type: ignore[override]
|
|
4688
|
+
@overload
|
|
4689
|
+
def __add__(self, other: int | float16 | uint8 | int8 | bool_ | Self, /) -> Self: ...
|
|
4690
|
+
@overload
|
|
4691
|
+
def __add__(self, other: integer | floating, /) -> floating: ...
|
|
4692
|
+
@overload
|
|
4693
|
+
def __add__(self, other: float, /) -> Self: ...
|
|
4694
|
+
@overload
|
|
4695
|
+
def __add__(self, other: complex, /) -> complexfloating: ...
|
|
4696
|
+
|
|
4697
|
+
@override # type: ignore[override]
|
|
4698
|
+
@overload
|
|
4699
|
+
def __radd__(self, other: int | float16 | uint8 | int8 | bool_, /) -> Self: ...
|
|
4700
|
+
@overload
|
|
4701
|
+
def __radd__(self, other: integer | floating, /) -> floating: ...
|
|
4702
|
+
@overload
|
|
4703
|
+
def __radd__(self, other: float, /) -> Self: ...
|
|
4704
|
+
@overload
|
|
4705
|
+
def __radd__(self, other: complex, /) -> complexfloating: ...
|
|
4706
|
+
|
|
4707
|
+
@override # type: ignore[override]
|
|
4708
|
+
@overload
|
|
4709
|
+
def __sub__(self, other: int | float16 | uint8 | int8 | bool_ | Self, /) -> Self: ...
|
|
4710
|
+
@overload
|
|
4711
|
+
def __sub__(self, other: integer | floating, /) -> floating: ...
|
|
4712
|
+
@overload
|
|
4713
|
+
def __sub__(self, other: float, /) -> Self: ...
|
|
4714
|
+
@overload
|
|
4715
|
+
def __sub__(self, other: complex, /) -> complexfloating: ...
|
|
4716
|
+
|
|
4717
|
+
@override # type: ignore[override]
|
|
4718
|
+
@overload
|
|
4719
|
+
def __rsub__(self, other: int | float16 | uint8 | int8 | bool_, /) -> Self: ...
|
|
4720
|
+
@overload
|
|
4721
|
+
def __rsub__(self, other: integer | floating, /) -> floating: ...
|
|
4722
|
+
@overload
|
|
4723
|
+
def __rsub__(self, other: float, /) -> Self: ...
|
|
4724
|
+
@overload
|
|
4725
|
+
def __rsub__(self, other: complex, /) -> complexfloating: ...
|
|
4726
|
+
|
|
4727
|
+
@override # type: ignore[override]
|
|
4728
|
+
@overload
|
|
4729
|
+
def __mul__(self, other: int | float16 | uint8 | int8 | bool_ | Self, /) -> Self: ...
|
|
4730
|
+
@overload
|
|
4731
|
+
def __mul__(self, other: integer | floating, /) -> floating: ...
|
|
4732
|
+
@overload
|
|
4733
|
+
def __mul__(self, other: float, /) -> Self: ...
|
|
4734
|
+
@overload
|
|
4735
|
+
def __mul__(self, other: complex, /) -> complexfloating: ...
|
|
4736
|
+
|
|
4737
|
+
@override # type: ignore[override]
|
|
4738
|
+
@overload
|
|
4739
|
+
def __rmul__(self, other: int | float16 | uint8 | int8 | bool_, /) -> Self: ...
|
|
4740
|
+
@overload
|
|
4741
|
+
def __rmul__(self, other: integer | floating, /) -> floating: ...
|
|
4742
|
+
@overload
|
|
4743
|
+
def __rmul__(self, other: float, /) -> Self: ...
|
|
4744
|
+
@overload
|
|
4745
|
+
def __rmul__(self, other: complex, /) -> complexfloating: ...
|
|
4746
|
+
|
|
4747
|
+
@override # type: ignore[override]
|
|
4748
|
+
@overload
|
|
4749
|
+
def __pow__(self, other: int | float16 | uint8 | int8 | bool_ | Self, mod: None = None, /) -> Self: ...
|
|
4750
|
+
@overload
|
|
4751
|
+
def __pow__(self, other: integer | floating, mod: None = None, /) -> floating: ...
|
|
4752
|
+
@overload
|
|
4753
|
+
def __pow__(self, other: float, mod: None = None, /) -> Self: ...
|
|
4754
|
+
@overload
|
|
4755
|
+
def __pow__(self, other: complex, mod: None = None, /) -> complexfloating: ...
|
|
4756
|
+
|
|
4757
|
+
@override # type: ignore[override]
|
|
4758
|
+
@overload
|
|
4759
|
+
def __rpow__(self, other: int | float16 | uint8 | int8 | bool_, mod: None = None, /) -> Self: ...
|
|
4760
|
+
@overload
|
|
4761
|
+
def __rpow__(self, other: integer | floating, mod: None = None, /) -> floating: ...
|
|
4762
|
+
@overload
|
|
4763
|
+
def __rpow__(self, other: float, mod: None = None, /) -> Self: ...
|
|
4764
|
+
@overload
|
|
4765
|
+
def __rpow__(self, other: complex, mod: None = None, /) -> complexfloating: ...
|
|
4766
|
+
|
|
4767
|
+
@override # type: ignore[override]
|
|
4768
|
+
@overload
|
|
4769
|
+
def __truediv__(self, other: int | float16 | uint8 | int8 | bool_ | Self, /) -> Self: ...
|
|
4770
|
+
@overload
|
|
4771
|
+
def __truediv__(self, other: integer | floating, /) -> floating: ...
|
|
4772
|
+
@overload
|
|
4773
|
+
def __truediv__(self, other: float, /) -> Self: ...
|
|
4774
|
+
@overload
|
|
4775
|
+
def __truediv__(self, other: complex, /) -> complexfloating: ...
|
|
4776
|
+
|
|
4777
|
+
@override # type: ignore[override]
|
|
4778
|
+
@overload
|
|
4779
|
+
def __rtruediv__(self, other: int | float16 | uint8 | int8 | bool_, /) -> Self: ...
|
|
4780
|
+
@overload
|
|
4781
|
+
def __rtruediv__(self, other: integer | floating, /) -> floating: ...
|
|
4782
|
+
@overload
|
|
4783
|
+
def __rtruediv__(self, other: float, /) -> Self: ...
|
|
4784
|
+
@overload
|
|
4785
|
+
def __rtruediv__(self, other: complex, /) -> complexfloating: ...
|
|
4786
|
+
|
|
4787
|
+
# modular division ops
|
|
4788
|
+
|
|
4789
|
+
@overload
|
|
4790
|
+
def __floordiv__(self, other: int | float16 | uint8 | int8 | bool_ | Self, /) -> Self: ...
|
|
4791
|
+
@overload
|
|
4792
|
+
def __floordiv__(self, other: integer | floating, /) -> floating: ...
|
|
4793
|
+
@overload
|
|
4794
|
+
def __floordiv__(self, other: float, /) -> Self: ...
|
|
4795
|
+
|
|
4796
|
+
@overload
|
|
4797
|
+
def __rfloordiv__(self, other: int | float16 | uint8 | int8 | bool_, /) -> Self: ...
|
|
4798
|
+
@overload
|
|
4799
|
+
def __rfloordiv__(self, other: integer | floating, /) -> floating: ...
|
|
4800
|
+
@overload
|
|
4801
|
+
def __rfloordiv__(self, other: float, /) -> Self: ...
|
|
4802
|
+
|
|
4803
|
+
@overload
|
|
4804
|
+
def __mod__(self, other: int | float16 | uint8 | int8 | bool_ | Self, /) -> Self: ...
|
|
4805
|
+
@overload
|
|
4806
|
+
def __mod__(self, other: integer | floating, /) -> floating: ...
|
|
4807
|
+
@overload
|
|
4808
|
+
def __mod__(self, other: float, /) -> Self: ...
|
|
4809
|
+
|
|
4810
|
+
@overload
|
|
4811
|
+
def __rmod__(self, other: int | float16 | uint8 | int8 | bool_, /) -> Self: ...
|
|
4812
|
+
@overload
|
|
4813
|
+
def __rmod__(self, other: integer | floating, /) -> floating: ...
|
|
4814
|
+
@overload
|
|
4815
|
+
def __rmod__(self, other: float, /) -> Self: ...
|
|
4816
|
+
|
|
4817
|
+
@overload
|
|
4818
|
+
def __divmod__(self, other: int | float16 | uint8 | int8 | bool_ | Self, /) -> _2Tuple[Self]: ...
|
|
4819
|
+
@overload
|
|
4820
|
+
def __divmod__(self, other: integer | floating, /) -> _2Tuple[floating]: ...
|
|
4821
|
+
@overload
|
|
4822
|
+
def __divmod__(self, other: float, /) -> _2Tuple[Self]: ...
|
|
4823
|
+
|
|
4824
|
+
@overload
|
|
4825
|
+
def __rdivmod__(self, other: int | float16 | uint8 | int8 | bool_, /) -> _2Tuple[Self]: ...
|
|
4826
|
+
@overload
|
|
4827
|
+
def __rdivmod__(self, other: integer | floating, /) -> _2Tuple[floating]: ...
|
|
4828
|
+
@overload
|
|
4829
|
+
def __rdivmod__(self, other: float, /) -> _2Tuple[Self]: ...
|
|
4830
|
+
|
|
4831
|
+
# NOTE: `is_integer` and `as_integer_ratio` are technically defined in the concrete subtypes
|
|
4832
|
+
def is_integer(self, /) -> builtins.bool: ...
|
|
4833
|
+
def as_integer_ratio(self, /) -> tuple[int, int]: ...
|
|
4834
|
+
|
|
4835
|
+
float16: TypeAlias = floating[_16Bit]
|
|
4836
|
+
float32: TypeAlias = floating[_32Bit]
|
|
4837
|
+
|
|
4838
|
+
# either a C `double`, `float`, or `longdouble`
|
|
4839
|
+
class float64(floating[_64Bit], float): # type: ignore[misc]
|
|
4840
|
+
@property
|
|
4841
|
+
def itemsize(self) -> L[8]: ...
|
|
4842
|
+
@property
|
|
4843
|
+
def nbytes(self) -> L[8]: ...
|
|
4844
|
+
|
|
4845
|
+
# overrides for `floating` and `builtins.float` compatibility (`_RealMixin` doesn't work)
|
|
4846
|
+
@property
|
|
4847
|
+
def real(self) -> Self: ...
|
|
4848
|
+
@property
|
|
4849
|
+
def imag(self) -> Self: ...
|
|
4850
|
+
def conjugate(self) -> Self: ...
|
|
4851
|
+
def __getformat__(self, typestr: L["double", "float"], /) -> str: ...
|
|
4852
|
+
def __getnewargs__(self, /) -> tuple[float]: ...
|
|
4853
|
+
|
|
4854
|
+
# float64-specific operator overrides
|
|
4855
|
+
@overload
|
|
4856
|
+
def __add__(self, other: _Float64_co, /) -> float64: ...
|
|
4857
|
+
@overload
|
|
4858
|
+
def __add__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4859
|
+
@overload
|
|
4860
|
+
def __add__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4861
|
+
@overload
|
|
4862
|
+
def __add__(self, other: complex, /) -> float64 | complex128: ...
|
|
4863
|
+
@overload
|
|
4864
|
+
def __radd__(self, other: _Float64_co, /) -> float64: ...
|
|
4865
|
+
@overload
|
|
4866
|
+
def __radd__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4867
|
+
@overload
|
|
4868
|
+
def __radd__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4869
|
+
@overload
|
|
4870
|
+
def __radd__(self, other: complex, /) -> float64 | complex128: ...
|
|
4871
|
+
|
|
4872
|
+
@overload
|
|
4873
|
+
def __sub__(self, other: _Float64_co, /) -> float64: ...
|
|
4874
|
+
@overload
|
|
4875
|
+
def __sub__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4876
|
+
@overload
|
|
4877
|
+
def __sub__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4878
|
+
@overload
|
|
4879
|
+
def __sub__(self, other: complex, /) -> float64 | complex128: ...
|
|
4880
|
+
@overload
|
|
4881
|
+
def __rsub__(self, other: _Float64_co, /) -> float64: ...
|
|
4882
|
+
@overload
|
|
4883
|
+
def __rsub__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4884
|
+
@overload
|
|
4885
|
+
def __rsub__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4886
|
+
@overload
|
|
4887
|
+
def __rsub__(self, other: complex, /) -> float64 | complex128: ...
|
|
4888
|
+
|
|
4889
|
+
@overload
|
|
4890
|
+
def __mul__(self, other: _Float64_co, /) -> float64: ...
|
|
4891
|
+
@overload
|
|
4892
|
+
def __mul__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4893
|
+
@overload
|
|
4894
|
+
def __mul__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4895
|
+
@overload
|
|
4896
|
+
def __mul__(self, other: complex, /) -> float64 | complex128: ...
|
|
4897
|
+
@overload
|
|
4898
|
+
def __rmul__(self, other: _Float64_co, /) -> float64: ...
|
|
4899
|
+
@overload
|
|
4900
|
+
def __rmul__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4901
|
+
@overload
|
|
4902
|
+
def __rmul__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4903
|
+
@overload
|
|
4904
|
+
def __rmul__(self, other: complex, /) -> float64 | complex128: ...
|
|
4905
|
+
|
|
4906
|
+
@overload
|
|
4907
|
+
def __truediv__(self, other: _Float64_co, /) -> float64: ...
|
|
4908
|
+
@overload
|
|
4909
|
+
def __truediv__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4910
|
+
@overload
|
|
4911
|
+
def __truediv__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4912
|
+
@overload
|
|
4913
|
+
def __truediv__(self, other: complex, /) -> float64 | complex128: ...
|
|
4914
|
+
@overload
|
|
4915
|
+
def __rtruediv__(self, other: _Float64_co, /) -> float64: ...
|
|
4916
|
+
@overload
|
|
4917
|
+
def __rtruediv__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4918
|
+
@overload
|
|
4919
|
+
def __rtruediv__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4920
|
+
@overload
|
|
4921
|
+
def __rtruediv__(self, other: complex, /) -> float64 | complex128: ...
|
|
4922
|
+
|
|
4923
|
+
@overload
|
|
4924
|
+
def __floordiv__(self, other: _Float64_co, /) -> float64: ...
|
|
4925
|
+
@overload
|
|
4926
|
+
def __floordiv__(self, other: complexfloating[_64Bit, _64Bit], /) -> complex128: ...
|
|
4172
4927
|
@overload
|
|
4173
4928
|
def __floordiv__(self, other: complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]: ...
|
|
4174
4929
|
@overload
|
|
@@ -4220,19 +4975,19 @@ longdouble: TypeAlias = floating[_NBitLongDouble]
|
|
|
4220
4975
|
|
|
4221
4976
|
class complexfloating(inexact[_NBit1, complex], Generic[_NBit1, _NBit2]):
|
|
4222
4977
|
@overload
|
|
4223
|
-
def
|
|
4224
|
-
|
|
4225
|
-
real: complex | SupportsComplex | SupportsFloat | SupportsIndex =
|
|
4226
|
-
imag: complex | SupportsFloat | SupportsIndex =
|
|
4978
|
+
def __new__(
|
|
4979
|
+
cls,
|
|
4980
|
+
real: complex | SupportsComplex | SupportsFloat | SupportsIndex = 0,
|
|
4981
|
+
imag: complex | SupportsFloat | SupportsIndex = 0,
|
|
4227
4982
|
/,
|
|
4228
|
-
) ->
|
|
4983
|
+
) -> Self: ...
|
|
4229
4984
|
@overload
|
|
4230
|
-
def
|
|
4985
|
+
def __new__(cls, real: _ConvertibleToComplex | None = 0, /) -> Self: ...
|
|
4231
4986
|
|
|
4232
4987
|
@property
|
|
4233
|
-
def real(self) -> floating[_NBit1]: ...
|
|
4988
|
+
def real(self) -> floating[_NBit1]: ...
|
|
4234
4989
|
@property
|
|
4235
|
-
def imag(self) -> floating[_NBit2]: ...
|
|
4990
|
+
def imag(self) -> floating[_NBit2]: ...
|
|
4236
4991
|
|
|
4237
4992
|
# NOTE: `__complex__` is technically defined in the concrete subtypes
|
|
4238
4993
|
def __complex__(self, /) -> complex: ...
|
|
@@ -4311,18 +5066,7 @@ class complexfloating(inexact[_NBit1, complex], Generic[_NBit1, _NBit2]):
|
|
|
4311
5066
|
|
|
4312
5067
|
complex64: TypeAlias = complexfloating[_32Bit, _32Bit]
|
|
4313
5068
|
|
|
4314
|
-
class complex128(complexfloating[_64Bit, _64Bit], complex):
|
|
4315
|
-
@overload
|
|
4316
|
-
def __new__(
|
|
4317
|
-
cls,
|
|
4318
|
-
real: complex | SupportsComplex | SupportsFloat | SupportsIndex = ...,
|
|
4319
|
-
imag: complex | SupportsFloat | SupportsIndex = ...,
|
|
4320
|
-
/,
|
|
4321
|
-
) -> Self: ...
|
|
4322
|
-
@overload
|
|
4323
|
-
def __new__(cls, real: _ConvertibleToComplex | None = ..., /) -> Self: ...
|
|
4324
|
-
|
|
4325
|
-
#
|
|
5069
|
+
class complex128(complexfloating[_64Bit, _64Bit], complex):
|
|
4326
5070
|
@property
|
|
4327
5071
|
def itemsize(self) -> L[16]: ...
|
|
4328
5072
|
@property
|
|
@@ -4381,26 +5125,26 @@ class timedelta64(_IntegralMixin, generic[_TD64ItemT_co], Generic[_TD64ItemT_co]
|
|
|
4381
5125
|
def nbytes(self) -> L[8]: ...
|
|
4382
5126
|
|
|
4383
5127
|
@overload
|
|
4384
|
-
def
|
|
5128
|
+
def __new__(cls, value: _TD64ItemT_co | timedelta64[_TD64ItemT_co], /) -> Self: ...
|
|
4385
5129
|
@overload
|
|
4386
|
-
def
|
|
5130
|
+
def __new__(cls, /) -> timedelta64[L[0]]: ...
|
|
4387
5131
|
@overload
|
|
4388
|
-
def
|
|
5132
|
+
def __new__(cls, value: _NaTValue | None, format: _TimeUnitSpec, /) -> timedelta64[None]: ...
|
|
4389
5133
|
@overload
|
|
4390
|
-
def
|
|
5134
|
+
def __new__(cls, value: L[0], format: _TimeUnitSpec[_IntTD64Unit] = ..., /) -> timedelta64[L[0]]: ...
|
|
4391
5135
|
@overload
|
|
4392
|
-
def
|
|
5136
|
+
def __new__(cls, value: _IntLike_co, format: _TimeUnitSpec[_IntTD64Unit] = ..., /) -> timedelta64[int]: ...
|
|
4393
5137
|
@overload
|
|
4394
|
-
def
|
|
5138
|
+
def __new__(cls, value: dt.timedelta, format: _TimeUnitSpec[_IntTimeUnit], /) -> timedelta64[int]: ...
|
|
4395
5139
|
@overload
|
|
4396
|
-
def
|
|
4397
|
-
|
|
5140
|
+
def __new__(
|
|
5141
|
+
cls,
|
|
4398
5142
|
value: dt.timedelta | _IntLike_co,
|
|
4399
5143
|
format: _TimeUnitSpec[_NativeTD64Unit] = ...,
|
|
4400
5144
|
/,
|
|
4401
|
-
) ->
|
|
5145
|
+
) -> timedelta64[dt.timedelta]: ...
|
|
4402
5146
|
@overload
|
|
4403
|
-
def
|
|
5147
|
+
def __new__(cls, value: _ConvertibleToTD64, format: _TimeUnitSpec = ..., /) -> Self: ...
|
|
4404
5148
|
|
|
4405
5149
|
# inherited at runtime from `signedinteger`
|
|
4406
5150
|
def __class_getitem__(cls, type_arg: type | object, /) -> GenericAlias: ...
|
|
@@ -4553,10 +5297,35 @@ class timedelta64(_IntegralMixin, generic[_TD64ItemT_co], Generic[_TD64ItemT_co]
|
|
|
4553
5297
|
@overload
|
|
4554
5298
|
def __rfloordiv__(self, a: timedelta64, /) -> int64: ...
|
|
4555
5299
|
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
5300
|
+
# comparison ops
|
|
5301
|
+
|
|
5302
|
+
@overload
|
|
5303
|
+
def __lt__(self, other: _TD64Like_co, /) -> bool_: ...
|
|
5304
|
+
@overload
|
|
5305
|
+
def __lt__(self, other: _ArrayLikeTD64_co | _NestedSequence[_SupportsGT], /) -> NDArray[bool_]: ...
|
|
5306
|
+
@overload
|
|
5307
|
+
def __lt__(self, other: _SupportsGT, /) -> bool_: ...
|
|
5308
|
+
|
|
5309
|
+
@overload
|
|
5310
|
+
def __le__(self, other: _TD64Like_co, /) -> bool_: ...
|
|
5311
|
+
@overload
|
|
5312
|
+
def __le__(self, other: _ArrayLikeTD64_co | _NestedSequence[_SupportsGE], /) -> NDArray[bool_]: ...
|
|
5313
|
+
@overload
|
|
5314
|
+
def __le__(self, other: _SupportsGT, /) -> bool_: ...
|
|
5315
|
+
|
|
5316
|
+
@overload
|
|
5317
|
+
def __gt__(self, other: _TD64Like_co, /) -> bool_: ...
|
|
5318
|
+
@overload
|
|
5319
|
+
def __gt__(self, other: _ArrayLikeTD64_co | _NestedSequence[_SupportsLT], /) -> NDArray[bool_]: ...
|
|
5320
|
+
@overload
|
|
5321
|
+
def __gt__(self, other: _SupportsGT, /) -> bool_: ...
|
|
5322
|
+
|
|
5323
|
+
@overload
|
|
5324
|
+
def __ge__(self, other: _TD64Like_co, /) -> bool_: ...
|
|
5325
|
+
@overload
|
|
5326
|
+
def __ge__(self, other: _ArrayLikeTD64_co | _NestedSequence[_SupportsLE], /) -> NDArray[bool_]: ...
|
|
5327
|
+
@overload
|
|
5328
|
+
def __ge__(self, other: _SupportsGT, /) -> bool_: ...
|
|
4560
5329
|
|
|
4561
5330
|
class datetime64(_RealMixin, generic[_DT64ItemT_co], Generic[_DT64ItemT_co]):
|
|
4562
5331
|
@property
|
|
@@ -4565,25 +5334,25 @@ class datetime64(_RealMixin, generic[_DT64ItemT_co], Generic[_DT64ItemT_co]):
|
|
|
4565
5334
|
def nbytes(self) -> L[8]: ...
|
|
4566
5335
|
|
|
4567
5336
|
@overload
|
|
4568
|
-
def
|
|
5337
|
+
def __new__(cls, value: datetime64[_DT64ItemT_co], /) -> Self: ...
|
|
4569
5338
|
@overload
|
|
4570
|
-
def
|
|
5339
|
+
def __new__(cls, value: _AnyDT64Arg, /) -> datetime64[_AnyDT64Arg]: ...
|
|
4571
5340
|
@overload
|
|
4572
|
-
def
|
|
5341
|
+
def __new__(cls, value: _NaTValue | None = ..., format: _TimeUnitSpec = ..., /) -> datetime64[None]: ...
|
|
4573
5342
|
@overload
|
|
4574
|
-
def
|
|
5343
|
+
def __new__(cls, value: _DT64Now, format: _TimeUnitSpec[_NativeTimeUnit] = ..., /) -> datetime64[dt.datetime]: ...
|
|
4575
5344
|
@overload
|
|
4576
|
-
def
|
|
5345
|
+
def __new__(cls, value: _DT64Date, format: _TimeUnitSpec[_DateUnit] = ..., /) -> datetime64[dt.date]: ...
|
|
4577
5346
|
@overload
|
|
4578
|
-
def
|
|
5347
|
+
def __new__(cls, value: int | bytes | str | dt.date, format: _TimeUnitSpec[_IntTimeUnit], /) -> datetime64[int]: ...
|
|
4579
5348
|
@overload
|
|
4580
|
-
def
|
|
4581
|
-
|
|
4582
|
-
) ->
|
|
5349
|
+
def __new__(
|
|
5350
|
+
cls, value: int | bytes | str | dt.date, format: _TimeUnitSpec[_NativeTimeUnit], /
|
|
5351
|
+
) -> datetime64[dt.datetime]: ...
|
|
4583
5352
|
@overload
|
|
4584
|
-
def
|
|
5353
|
+
def __new__(cls, value: int | bytes | str | dt.date, format: _TimeUnitSpec[_DateUnit], /) -> datetime64[dt.date]: ...
|
|
4585
5354
|
@overload
|
|
4586
|
-
def
|
|
5355
|
+
def __new__(cls, value: bytes | str | dt.date | None, format: _TimeUnitSpec = ..., /) -> Self: ...
|
|
4587
5356
|
|
|
4588
5357
|
@overload
|
|
4589
5358
|
def __add__(self: datetime64[_AnyDT64Item], x: int | integer | np.bool, /) -> datetime64[_AnyDT64Item]: ...
|
|
@@ -4653,18 +5422,43 @@ class datetime64(_RealMixin, generic[_DT64ItemT_co], Generic[_DT64ItemT_co]):
|
|
|
4653
5422
|
@overload
|
|
4654
5423
|
def __rsub__(self, x: datetime64, /) -> timedelta64: ...
|
|
4655
5424
|
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
5425
|
+
@overload
|
|
5426
|
+
def __lt__(self, other: datetime64, /) -> bool_: ...
|
|
5427
|
+
@overload
|
|
5428
|
+
def __lt__(self, other: _ArrayLikeDT64_co | _NestedSequence[_SupportsGT], /) -> NDArray[bool_]: ...
|
|
5429
|
+
@overload
|
|
5430
|
+
def __lt__(self, other: _SupportsGT, /) -> bool_: ...
|
|
5431
|
+
|
|
5432
|
+
@overload
|
|
5433
|
+
def __le__(self, other: datetime64, /) -> bool_: ...
|
|
5434
|
+
@overload
|
|
5435
|
+
def __le__(self, other: _ArrayLikeDT64_co | _NestedSequence[_SupportsGE], /) -> NDArray[bool_]: ...
|
|
5436
|
+
@overload
|
|
5437
|
+
def __le__(self, other: _SupportsGT, /) -> bool_: ...
|
|
5438
|
+
|
|
5439
|
+
@overload
|
|
5440
|
+
def __gt__(self, other: datetime64, /) -> bool_: ...
|
|
5441
|
+
@overload
|
|
5442
|
+
def __gt__(self, other: _ArrayLikeDT64_co | _NestedSequence[_SupportsLT], /) -> NDArray[bool_]: ...
|
|
5443
|
+
@overload
|
|
5444
|
+
def __gt__(self, other: _SupportsGT, /) -> bool_: ...
|
|
4660
5445
|
|
|
4661
|
-
|
|
5446
|
+
@overload
|
|
5447
|
+
def __ge__(self, other: datetime64, /) -> bool_: ...
|
|
5448
|
+
@overload
|
|
5449
|
+
def __ge__(self, other: _ArrayLikeDT64_co | _NestedSequence[_SupportsLE], /) -> NDArray[bool_]: ...
|
|
5450
|
+
@overload
|
|
5451
|
+
def __ge__(self, other: _SupportsGT, /) -> bool_: ...
|
|
5452
|
+
|
|
5453
|
+
class flexible(_RealMixin, generic[_FlexibleItemT_co], Generic[_FlexibleItemT_co]):
|
|
5454
|
+
@abstractmethod
|
|
5455
|
+
def __new__(cls) -> Self: ...
|
|
4662
5456
|
|
|
4663
5457
|
class void(flexible[bytes | tuple[Any, ...]]):
|
|
4664
5458
|
@overload
|
|
4665
|
-
def
|
|
5459
|
+
def __new__(cls, value: _IntLike_co | bytes, /, dtype: None = None) -> Self: ...
|
|
4666
5460
|
@overload
|
|
4667
|
-
def
|
|
5461
|
+
def __new__(cls, value: Any, /, dtype: _DTypeLikeVoid) -> Self: ...
|
|
4668
5462
|
|
|
4669
5463
|
@overload
|
|
4670
5464
|
def __getitem__(self, key: str | SupportsIndex, /) -> Any: ...
|
|
@@ -4676,7 +5470,7 @@ class void(flexible[bytes | tuple[Any, ...]]):
|
|
|
4676
5470
|
|
|
4677
5471
|
class character(flexible[_CharacterItemT_co], Generic[_CharacterItemT_co]):
|
|
4678
5472
|
@abstractmethod
|
|
4679
|
-
def
|
|
5473
|
+
def __new__(cls) -> Self: ...
|
|
4680
5474
|
|
|
4681
5475
|
# NOTE: Most `np.bytes_` / `np.str_` methods return their builtin `bytes` / `str` counterpart
|
|
4682
5476
|
|
|
@@ -4686,12 +5480,6 @@ class bytes_(character[bytes], bytes):
|
|
|
4686
5480
|
@overload
|
|
4687
5481
|
def __new__(cls, s: str, /, encoding: str, errors: str = ...) -> Self: ...
|
|
4688
5482
|
|
|
4689
|
-
#
|
|
4690
|
-
@overload
|
|
4691
|
-
def __init__(self, o: object = ..., /) -> None: ...
|
|
4692
|
-
@overload
|
|
4693
|
-
def __init__(self, s: str, /, encoding: str, errors: str = ...) -> None: ...
|
|
4694
|
-
|
|
4695
5483
|
#
|
|
4696
5484
|
def __bytes__(self, /) -> bytes: ...
|
|
4697
5485
|
|
|
@@ -4701,12 +5489,6 @@ class str_(character[str], str):
|
|
|
4701
5489
|
@overload
|
|
4702
5490
|
def __new__(cls, value: bytes, /, encoding: str = ..., errors: str = ...) -> Self: ...
|
|
4703
5491
|
|
|
4704
|
-
#
|
|
4705
|
-
@overload
|
|
4706
|
-
def __init__(self, value: object = ..., /) -> None: ...
|
|
4707
|
-
@overload
|
|
4708
|
-
def __init__(self, value: bytes, /, encoding: str = ..., errors: str = ...) -> None: ...
|
|
4709
|
-
|
|
4710
5492
|
# See `numpy._typing._ufunc` for more concrete nin-/nout-specific stubs
|
|
4711
5493
|
@final
|
|
4712
5494
|
class ufunc:
|
|
@@ -4877,27 +5659,6 @@ bitwise_right_shift = right_shift
|
|
|
4877
5659
|
permute_dims = transpose
|
|
4878
5660
|
pow = power
|
|
4879
5661
|
|
|
4880
|
-
class errstate:
|
|
4881
|
-
def __init__(
|
|
4882
|
-
self,
|
|
4883
|
-
*,
|
|
4884
|
-
call: _ErrCall = ...,
|
|
4885
|
-
all: _ErrKind | None = ...,
|
|
4886
|
-
divide: _ErrKind | None = ...,
|
|
4887
|
-
over: _ErrKind | None = ...,
|
|
4888
|
-
under: _ErrKind | None = ...,
|
|
4889
|
-
invalid: _ErrKind | None = ...,
|
|
4890
|
-
) -> None: ...
|
|
4891
|
-
def __enter__(self) -> None: ...
|
|
4892
|
-
def __exit__(
|
|
4893
|
-
self,
|
|
4894
|
-
exc_type: type[BaseException] | None,
|
|
4895
|
-
exc_value: BaseException | None,
|
|
4896
|
-
traceback: TracebackType | None,
|
|
4897
|
-
/,
|
|
4898
|
-
) -> None: ...
|
|
4899
|
-
def __call__(self, func: _CallableT) -> _CallableT: ...
|
|
4900
|
-
|
|
4901
5662
|
# TODO: The type of each `__next__` and `iters` return-type depends
|
|
4902
5663
|
# on the length and dtype of `args`; we can't describe this behavior yet
|
|
4903
5664
|
# as we lack variadics (PEP 646).
|