numpy 2.3.3__cp312-cp312-win32.whl → 2.3.4__cp312-cp312-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.

Files changed (76) hide show
  1. numpy/__config__.py +4 -4
  2. numpy/__init__.pyi +819 -218
  3. numpy/_core/_multiarray_tests.cp312-win32.lib +0 -0
  4. numpy/_core/_multiarray_tests.cp312-win32.pyd +0 -0
  5. numpy/_core/_multiarray_umath.cp312-win32.lib +0 -0
  6. numpy/_core/_multiarray_umath.cp312-win32.pyd +0 -0
  7. numpy/_core/_operand_flag_tests.cp312-win32.lib +0 -0
  8. numpy/_core/_operand_flag_tests.cp312-win32.pyd +0 -0
  9. numpy/_core/_rational_tests.cp312-win32.lib +0 -0
  10. numpy/_core/_rational_tests.cp312-win32.pyd +0 -0
  11. numpy/_core/_simd.cp312-win32.lib +0 -0
  12. numpy/_core/_simd.cp312-win32.pyd +0 -0
  13. numpy/_core/_struct_ufunc_tests.cp312-win32.lib +0 -0
  14. numpy/_core/_struct_ufunc_tests.cp312-win32.pyd +0 -0
  15. numpy/_core/_ufunc_config.py +2 -0
  16. numpy/_core/_ufunc_config.pyi +52 -6
  17. numpy/_core/_umath_tests.cp312-win32.lib +0 -0
  18. numpy/_core/_umath_tests.cp312-win32.pyd +0 -0
  19. numpy/_core/lib/npymath.lib +0 -0
  20. numpy/_core/lib/pkgconfig/numpy.pc +1 -1
  21. numpy/_core/numerictypes.py +1 -1
  22. numpy/_core/tests/test_api.py +34 -1
  23. numpy/_core/tests/test_numerictypes.py +29 -0
  24. numpy/_core/tests/test_stringdtype.py +16 -16
  25. numpy/_core/tests/test_strings.py +15 -0
  26. numpy/_core/tests/test_umath.py +12 -0
  27. numpy/exceptions.pyi +2 -0
  28. numpy/fft/_pocketfft_umath.cp312-win32.lib +0 -0
  29. numpy/fft/_pocketfft_umath.cp312-win32.pyd +0 -0
  30. numpy/lib/_histograms_impl.pyi +8 -8
  31. numpy/lib/_index_tricks_impl.pyi +12 -0
  32. numpy/lib/_polynomial_impl.pyi +10 -8
  33. numpy/lib/mixins.pyi +2 -0
  34. numpy/lib/tests/test_index_tricks.py +5 -0
  35. numpy/linalg/_linalg.pyi +32 -39
  36. numpy/linalg/_umath_linalg.cp312-win32.lib +0 -0
  37. numpy/linalg/_umath_linalg.cp312-win32.pyd +0 -0
  38. numpy/linalg/lapack_lite.cp312-win32.lib +0 -0
  39. numpy/linalg/lapack_lite.cp312-win32.pyd +0 -0
  40. numpy/ma/extras.pyi +4 -0
  41. numpy/random/_bounded_integers.cp312-win32.lib +0 -0
  42. numpy/random/_bounded_integers.cp312-win32.pyd +0 -0
  43. numpy/random/_common.cp312-win32.lib +0 -0
  44. numpy/random/_common.cp312-win32.pyd +0 -0
  45. numpy/random/_generator.cp312-win32.lib +0 -0
  46. numpy/random/_generator.cp312-win32.pyd +0 -0
  47. numpy/random/_mt19937.cp312-win32.lib +0 -0
  48. numpy/random/_mt19937.cp312-win32.pyd +0 -0
  49. numpy/random/_pcg64.cp312-win32.lib +0 -0
  50. numpy/random/_pcg64.cp312-win32.pyd +0 -0
  51. numpy/random/_philox.cp312-win32.lib +0 -0
  52. numpy/random/_philox.cp312-win32.pyd +0 -0
  53. numpy/random/_sfc64.cp312-win32.lib +0 -0
  54. numpy/random/_sfc64.cp312-win32.pyd +0 -0
  55. numpy/random/bit_generator.cp312-win32.lib +0 -0
  56. numpy/random/bit_generator.cp312-win32.pyd +0 -0
  57. numpy/random/lib/npyrandom.lib +0 -0
  58. numpy/random/mtrand.cp312-win32.lib +0 -0
  59. numpy/random/mtrand.cp312-win32.pyd +0 -0
  60. numpy/random/tests/test_generator_mt19937.py +5 -0
  61. numpy/testing/_private/extbuild.pyi +3 -3
  62. numpy/testing/_private/utils.pyi +1 -1
  63. numpy/typing/tests/data/fail/bitwise_ops.pyi +3 -3
  64. numpy/typing/tests/data/fail/scalars.pyi +6 -6
  65. numpy/typing/tests/data/reveal/arithmetic.pyi +29 -29
  66. numpy/typing/tests/data/reveal/array_constructors.pyi +5 -5
  67. numpy/typing/tests/data/reveal/bitwise_ops.pyi +10 -11
  68. numpy/typing/tests/data/reveal/linalg.pyi +6 -6
  69. numpy/typing/tests/data/reveal/mod.pyi +18 -19
  70. numpy/version.py +2 -2
  71. {numpy-2.3.3.dist-info → numpy-2.3.4.dist-info}/METADATA +1 -1
  72. {numpy-2.3.3.dist-info → numpy-2.3.4.dist-info}/RECORD +75 -76
  73. numpy/_typing/_callable.pyi +0 -279
  74. {numpy-2.3.3.dist-info → numpy-2.3.4.dist-info}/LICENSE.txt +0 -0
  75. {numpy-2.3.3.dist-info → numpy-2.3.4.dist-info}/WHEEL +0 -0
  76. {numpy-2.3.3.dist-info → numpy-2.3.4.dist-info}/entry_points.txt +0 -0
numpy/__init__.pyi CHANGED
@@ -133,26 +133,6 @@ from numpy._typing import (
133
133
  _GUFunc_Nin2_Nout1,
134
134
  )
135
135
 
136
- from numpy._typing._callable import (
137
- _IntTrueDiv,
138
- _UnsignedIntOp,
139
- _UnsignedIntBitOp,
140
- _UnsignedIntMod,
141
- _UnsignedIntDivMod,
142
- _SignedIntOp,
143
- _SignedIntBitOp,
144
- _SignedIntMod,
145
- _SignedIntDivMod,
146
- _FloatOp,
147
- _FloatMod,
148
- _FloatDivMod,
149
- _NumberOp,
150
- _ComparisonOpLT,
151
- _ComparisonOpLE,
152
- _ComparisonOpGT,
153
- _ComparisonOpGE,
154
- )
155
-
156
136
  # NOTE: Numpy's mypy plugin is used for removing the types unavailable to the specific platform
157
137
  from numpy._typing._extended_precision import (
158
138
  float96,
@@ -211,7 +191,7 @@ from typing import (
211
191
  # library include `typing_extensions` stubs:
212
192
  # https://github.com/python/typeshed/blob/main/stdlib/typing_extensions.pyi
213
193
  from _typeshed import Incomplete, StrOrBytesPath, SupportsFlush, SupportsLenAndGetItem, SupportsWrite
214
- from typing_extensions import CapsuleType, TypeVar
194
+ from typing_extensions import CapsuleType, TypeVar, deprecated, override
215
195
 
216
196
  from numpy import (
217
197
  char,
@@ -315,8 +295,7 @@ from numpy._core._ufunc_config import (
315
295
  getbufsize,
316
296
  seterrcall,
317
297
  geterrcall,
318
- _ErrKind,
319
- _ErrCall,
298
+ errstate,
320
299
  )
321
300
 
322
301
  from numpy._core.arrayprint import (
@@ -776,8 +755,6 @@ _T_contra = TypeVar("_T_contra", contravariant=True)
776
755
  _RealT_co = TypeVar("_RealT_co", covariant=True)
777
756
  _ImagT_co = TypeVar("_ImagT_co", covariant=True)
778
757
 
779
- _CallableT = TypeVar("_CallableT", bound=Callable[..., object])
780
-
781
758
  _DTypeT = TypeVar("_DTypeT", bound=dtype)
782
759
  _DTypeT_co = TypeVar("_DTypeT_co", bound=dtype, default=dtype, covariant=True)
783
760
  _FlexDTypeT = TypeVar("_FlexDTypeT", bound=dtype[flexible])
@@ -1053,6 +1030,26 @@ class _FormerAttrsDict(TypedDict):
1053
1030
 
1054
1031
  ### Protocols (for internal use only)
1055
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
+
1056
1053
  @type_check_only
1057
1054
  class _SupportsFileMethods(SupportsFlush, Protocol):
1058
1055
  # Protocol for representing file-like-objects accepted by `ndarray.tofile` and `fromfile`
@@ -3512,7 +3509,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
3512
3509
  # See https://github.com/numpy/numpy-stubs/pull/80 for more details.
3513
3510
  class generic(_ArrayOrScalarCommon, Generic[_ItemT_co]):
3514
3511
  @abstractmethod
3515
- def __init__(self, *args: Any, **kwargs: Any) -> None: ...
3512
+ def __new__(cls) -> Self: ...
3516
3513
  def __hash__(self) -> int: ...
3517
3514
  @overload
3518
3515
  def __array__(self, dtype: None = None, /) -> ndarray[tuple[()], dtype[Self]]: ...
@@ -3774,30 +3771,51 @@ class generic(_ArrayOrScalarCommon, Generic[_ItemT_co]):
3774
3771
 
3775
3772
  class number(generic[_NumberItemT_co], Generic[_NBit, _NumberItemT_co]):
3776
3773
  @abstractmethod
3777
- def __init__(self, value: _NumberItemT_co, /) -> None: ...
3774
+ def __new__(cls) -> Self: ...
3778
3775
  def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
3779
3776
 
3780
3777
  def __neg__(self) -> Self: ...
3781
3778
  def __pos__(self) -> Self: ...
3782
3779
  def __abs__(self) -> Self: ...
3783
3780
 
3784
- __add__: _NumberOp
3785
- __radd__: _NumberOp
3786
- __sub__: _NumberOp
3787
- __rsub__: _NumberOp
3788
- __mul__: _NumberOp
3789
- __rmul__: _NumberOp
3790
- __floordiv__: _NumberOp
3791
- __rfloordiv__: _NumberOp
3792
- __pow__: _NumberOp
3793
- __rpow__: _NumberOp
3794
- __truediv__: _NumberOp
3795
- __rtruediv__: _NumberOp
3796
-
3797
- __lt__: _ComparisonOpLT[_NumberLike_co, _ArrayLikeNumber_co]
3798
- __le__: _ComparisonOpLE[_NumberLike_co, _ArrayLikeNumber_co]
3799
- __gt__: _ComparisonOpGT[_NumberLike_co, _ArrayLikeNumber_co]
3800
- __ge__: _ComparisonOpGE[_NumberLike_co, _ArrayLikeNumber_co]
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_: ...
3801
3819
 
3802
3820
  class bool(generic[_BoolItemT_co], Generic[_BoolItemT_co]):
3803
3821
  @property
@@ -3810,13 +3828,13 @@ class bool(generic[_BoolItemT_co], Generic[_BoolItemT_co]):
3810
3828
  def imag(self) -> np.bool[L[False]]: ...
3811
3829
 
3812
3830
  @overload # mypy bug workaround: https://github.com/numpy/numpy/issues/29245
3813
- def __init__(self: np.bool[builtins.bool], value: Never, /) -> None: ...
3831
+ def __new__(cls, value: Never, /) -> np.bool[builtins.bool]: ...
3814
3832
  @overload
3815
- def __init__(self: np.bool[L[False]], value: _Falsy = ..., /) -> None: ...
3833
+ def __new__(cls, value: _Falsy = ..., /) -> np.bool[L[False]]: ...
3816
3834
  @overload
3817
- def __init__(self: np.bool[L[True]], value: _Truthy, /) -> None: ...
3835
+ def __new__(cls, value: _Truthy, /) -> np.bool[L[True]]: ...
3818
3836
  @overload
3819
- def __init__(self: np.bool[builtins.bool], value: object, /) -> None: ...
3837
+ def __new__(cls, value: object, /) -> np.bool[builtins.bool]: ...
3820
3838
 
3821
3839
  def __bool__(self, /) -> _BoolItemT_co: ...
3822
3840
 
@@ -4064,10 +4082,33 @@ class bool(generic[_BoolItemT_co], Generic[_BoolItemT_co]):
4064
4082
  def __or__(self, other: int, /) -> np.bool | intp: ...
4065
4083
  __ror__ = __or__
4066
4084
 
4067
- __lt__: _ComparisonOpLT[_NumberLike_co, _ArrayLikeNumber_co]
4068
- __le__: _ComparisonOpLE[_NumberLike_co, _ArrayLikeNumber_co]
4069
- __gt__: _ComparisonOpGT[_NumberLike_co, _ArrayLikeNumber_co]
4070
- __ge__: _ComparisonOpGE[_NumberLike_co, _ArrayLikeNumber_co]
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_: ...
4105
+
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_: ...
4071
4112
 
4072
4113
  # NOTE: This should _not_ be `Final` or a `TypeAlias`
4073
4114
  bool_ = bool
@@ -4090,7 +4131,7 @@ class object_(_RealMixin, generic):
4090
4131
  def __new__(cls, value: _T, /) -> _T: ... # type: ignore[misc]
4091
4132
  @overload # catch-all
4092
4133
  def __new__(cls, value: Any = ..., /) -> object | NDArray[Self]: ... # type: ignore[misc]
4093
- def __init__(self, value: object = ..., /) -> None: ...
4134
+
4094
4135
  def __hash__(self, /) -> int: ...
4095
4136
  def __abs__(self, /) -> object_: ... # this affects NDArray[object_].__abs__
4096
4137
  def __call__(self, /, *args: object, **kwargs: object) -> Any: ...
@@ -4100,17 +4141,32 @@ class object_(_RealMixin, generic):
4100
4141
 
4101
4142
  class integer(_IntegralMixin, _RoundMixin, number[_NBit, int]):
4102
4143
  @abstractmethod
4103
- def __init__(self, value: _ConvertibleToInt = ..., /) -> None: ...
4144
+ def __new__(cls) -> Self: ...
4104
4145
 
4105
4146
  # NOTE: `bit_count` and `__index__` are technically defined in the concrete subtypes
4106
4147
  def bit_count(self, /) -> int: ...
4107
4148
  def __index__(self, /) -> int: ...
4108
4149
  def __invert__(self, /) -> Self: ...
4109
4150
 
4110
- __truediv__: _IntTrueDiv[_NBit]
4111
- __rtruediv__: _IntTrueDiv[_NBit]
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: ...
4112
4165
  def __mod__(self, value: _IntLike_co, /) -> integer: ...
4113
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
+
4114
4170
  # Ensure that objects annotated as `integer` support bit-wise operations
4115
4171
  def __lshift__(self, other: _IntLike_co, /) -> integer: ...
4116
4172
  def __rlshift__(self, other: _IntLike_co, /) -> integer: ...
@@ -4123,33 +4179,230 @@ class integer(_IntegralMixin, _RoundMixin, number[_NBit, int]):
4123
4179
  def __xor__(self, other: _IntLike_co, /) -> integer: ...
4124
4180
  def __rxor__(self, other: _IntLike_co, /) -> integer: ...
4125
4181
 
4126
- class signedinteger(integer[_NBit1]):
4127
- def __init__(self, value: _ConvertibleToInt = ..., /) -> None: ...
4128
-
4129
- __add__: _SignedIntOp[_NBit1]
4130
- __radd__: _SignedIntOp[_NBit1]
4131
- __sub__: _SignedIntOp[_NBit1]
4132
- __rsub__: _SignedIntOp[_NBit1]
4133
- __mul__: _SignedIntOp[_NBit1]
4134
- __rmul__: _SignedIntOp[_NBit1]
4135
- __floordiv__: _SignedIntOp[_NBit1]
4136
- __rfloordiv__: _SignedIntOp[_NBit1]
4137
- __pow__: _SignedIntOp[_NBit1]
4138
- __rpow__: _SignedIntOp[_NBit1]
4139
- __lshift__: _SignedIntBitOp[_NBit1]
4140
- __rlshift__: _SignedIntBitOp[_NBit1]
4141
- __rshift__: _SignedIntBitOp[_NBit1]
4142
- __rrshift__: _SignedIntBitOp[_NBit1]
4143
- __and__: _SignedIntBitOp[_NBit1]
4144
- __rand__: _SignedIntBitOp[_NBit1]
4145
- __xor__: _SignedIntBitOp[_NBit1]
4146
- __rxor__: _SignedIntBitOp[_NBit1]
4147
- __or__: _SignedIntBitOp[_NBit1]
4148
- __ror__: _SignedIntBitOp[_NBit1]
4149
- __mod__: _SignedIntMod[_NBit1]
4150
- __rmod__: _SignedIntMod[_NBit1]
4151
- __divmod__: _SignedIntDivMod[_NBit1]
4152
- __rdivmod__: _SignedIntDivMod[_NBit1]
4182
+ class signedinteger(integer[_NBit]):
4183
+ def __new__(cls, value: _ConvertibleToInt = 0, /) -> Self: ...
4184
+
4185
+ # arithmetic ops
4186
+
4187
+ @override # type: ignore[override]
4188
+ @overload
4189
+ def __add__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
4190
+ @overload
4191
+ def __add__(self, other: float, /) -> float64: ...
4192
+ @overload
4193
+ def __add__(self, other: complex, /) -> complex128: ...
4194
+ @overload
4195
+ def __add__(self, other: signedinteger, /) -> signedinteger: ...
4196
+ @overload
4197
+ def __add__(self, other: integer, /) -> Incomplete: ...
4198
+
4199
+ @override # type: ignore[override]
4200
+ @overload
4201
+ def __radd__(self, other: int | int8 | bool_, /) -> Self: ...
4202
+ @overload
4203
+ def __radd__(self, other: float, /) -> float64: ...
4204
+ @overload
4205
+ def __radd__(self, other: complex, /) -> complex128: ...
4206
+ @overload
4207
+ def __radd__(self, other: signedinteger, /) -> signedinteger: ...
4208
+ @overload
4209
+ def __radd__(self, other: integer, /) -> Incomplete: ...
4210
+
4211
+ @override # type: ignore[override]
4212
+ @overload
4213
+ def __sub__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
4214
+ @overload
4215
+ def __sub__(self, other: float, /) -> float64: ...
4216
+ @overload
4217
+ def __sub__(self, other: complex, /) -> complex128: ...
4218
+ @overload
4219
+ def __sub__(self, other: signedinteger, /) -> signedinteger: ...
4220
+ @overload
4221
+ def __sub__(self, other: integer, /) -> Incomplete: ...
4222
+
4223
+ @override # type: ignore[override]
4224
+ @overload
4225
+ def __rsub__(self, other: int | int8 | bool_, /) -> Self: ...
4226
+ @overload
4227
+ def __rsub__(self, other: float, /) -> float64: ...
4228
+ @overload
4229
+ def __rsub__(self, other: complex, /) -> complex128: ...
4230
+ @overload
4231
+ def __rsub__(self, other: signedinteger, /) -> signedinteger: ...
4232
+ @overload
4233
+ def __rsub__(self, other: integer, /) -> Incomplete: ...
4234
+
4235
+ @override # type: ignore[override]
4236
+ @overload
4237
+ def __mul__(self, other: int | int8 | bool_ | Self, /) -> Self: ...
4238
+ @overload
4239
+ def __mul__(self, other: float, /) -> float64: ...
4240
+ @overload
4241
+ def __mul__(self, other: complex, /) -> complex128: ...
4242
+ @overload
4243
+ def __mul__(self, other: signedinteger, /) -> signedinteger: ...
4244
+ @overload
4245
+ def __mul__(self, other: integer, /) -> Incomplete: ...
4246
+
4247
+ @override # type: ignore[override]
4248
+ @overload
4249
+ def __rmul__(self, other: int | int8 | bool_, /) -> Self: ...
4250
+ @overload
4251
+ def __rmul__(self, other: float, /) -> float64: ...
4252
+ @overload
4253
+ def __rmul__(self, other: complex, /) -> complex128: ...
4254
+ @overload
4255
+ def __rmul__(self, other: signedinteger, /) -> signedinteger: ...
4256
+ @overload
4257
+ def __rmul__(self, other: integer, /) -> Incomplete: ...
4258
+
4259
+ @override # type: ignore[override]
4260
+ @overload
4261
+ def __pow__(self, other: int | int8 | bool_ | Self, mod: None = None, /) -> Self: ...
4262
+ @overload
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: ...
4153
4406
 
4154
4407
  int8 = signedinteger[_8Bit]
4155
4408
  int16 = signedinteger[_16Bit]
@@ -4165,33 +4418,249 @@ long = signedinteger[_NBitLong]
4165
4418
  longlong = signedinteger[_NBitLongLong]
4166
4419
 
4167
4420
  class unsignedinteger(integer[_NBit1]):
4168
- # NOTE: `uint64 + signedinteger -> float64`
4169
- def __init__(self, value: _ConvertibleToInt = ..., /) -> None: ...
4170
-
4171
- __add__: _UnsignedIntOp[_NBit1]
4172
- __radd__: _UnsignedIntOp[_NBit1]
4173
- __sub__: _UnsignedIntOp[_NBit1]
4174
- __rsub__: _UnsignedIntOp[_NBit1]
4175
- __mul__: _UnsignedIntOp[_NBit1]
4176
- __rmul__: _UnsignedIntOp[_NBit1]
4177
- __floordiv__: _UnsignedIntOp[_NBit1]
4178
- __rfloordiv__: _UnsignedIntOp[_NBit1]
4179
- __pow__: _UnsignedIntOp[_NBit1]
4180
- __rpow__: _UnsignedIntOp[_NBit1]
4181
- __lshift__: _UnsignedIntBitOp[_NBit1]
4182
- __rlshift__: _UnsignedIntBitOp[_NBit1]
4183
- __rshift__: _UnsignedIntBitOp[_NBit1]
4184
- __rrshift__: _UnsignedIntBitOp[_NBit1]
4185
- __and__: _UnsignedIntBitOp[_NBit1]
4186
- __rand__: _UnsignedIntBitOp[_NBit1]
4187
- __xor__: _UnsignedIntBitOp[_NBit1]
4188
- __rxor__: _UnsignedIntBitOp[_NBit1]
4189
- __or__: _UnsignedIntBitOp[_NBit1]
4190
- __ror__: _UnsignedIntBitOp[_NBit1]
4191
- __mod__: _UnsignedIntMod[_NBit1]
4192
- __rmod__: _UnsignedIntMod[_NBit1]
4193
- __divmod__: _UnsignedIntDivMod[_NBit1]
4194
- __rdivmod__: _UnsignedIntDivMod[_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: ...
4195
4664
 
4196
4665
  uint8: TypeAlias = unsignedinteger[_8Bit]
4197
4666
  uint16: TypeAlias = unsignedinteger[_16Bit]
@@ -4208,27 +4677,156 @@ ulonglong: TypeAlias = unsignedinteger[_NBitLongLong]
4208
4677
 
4209
4678
  class inexact(number[_NBit, _InexactItemT_co], Generic[_NBit, _InexactItemT_co]):
4210
4679
  @abstractmethod
4211
- def __init__(self, value: _InexactItemT_co | None = ..., /) -> None: ...
4680
+ def __new__(cls) -> Self: ...
4212
4681
 
4213
4682
  class floating(_RealMixin, _RoundMixin, inexact[_NBit1, float]):
4214
- def __init__(self, value: _ConvertibleToFloat | None = ..., /) -> None: ...
4215
-
4216
- __add__: _FloatOp[_NBit1]
4217
- __radd__: _FloatOp[_NBit1]
4218
- __sub__: _FloatOp[_NBit1]
4219
- __rsub__: _FloatOp[_NBit1]
4220
- __mul__: _FloatOp[_NBit1]
4221
- __rmul__: _FloatOp[_NBit1]
4222
- __truediv__: _FloatOp[_NBit1]
4223
- __rtruediv__: _FloatOp[_NBit1]
4224
- __floordiv__: _FloatOp[_NBit1]
4225
- __rfloordiv__: _FloatOp[_NBit1]
4226
- __pow__: _FloatOp[_NBit1]
4227
- __rpow__: _FloatOp[_NBit1]
4228
- __mod__: _FloatMod[_NBit1]
4229
- __rmod__: _FloatMod[_NBit1]
4230
- __divmod__: _FloatDivMod[_NBit1]
4231
- __rdivmod__: _FloatDivMod[_NBit1]
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]: ...
4232
4830
 
4233
4831
  # NOTE: `is_integer` and `as_integer_ratio` are technically defined in the concrete subtypes
4234
4832
  def is_integer(self, /) -> builtins.bool: ...
@@ -4239,9 +4837,6 @@ float32: TypeAlias = floating[_32Bit]
4239
4837
 
4240
4838
  # either a C `double`, `float`, or `longdouble`
4241
4839
  class float64(floating[_64Bit], float): # type: ignore[misc]
4242
- def __new__(cls, x: _ConvertibleToFloat | None = ..., /) -> Self: ...
4243
-
4244
- #
4245
4840
  @property
4246
4841
  def itemsize(self) -> L[8]: ...
4247
4842
  @property
@@ -4380,19 +4975,19 @@ longdouble: TypeAlias = floating[_NBitLongDouble]
4380
4975
 
4381
4976
  class complexfloating(inexact[_NBit1, complex], Generic[_NBit1, _NBit2]):
4382
4977
  @overload
4383
- def __init__(
4384
- self,
4385
- real: complex | SupportsComplex | SupportsFloat | SupportsIndex = ...,
4386
- imag: complex | SupportsFloat | SupportsIndex = ...,
4978
+ def __new__(
4979
+ cls,
4980
+ real: complex | SupportsComplex | SupportsFloat | SupportsIndex = 0,
4981
+ imag: complex | SupportsFloat | SupportsIndex = 0,
4387
4982
  /,
4388
- ) -> None: ...
4983
+ ) -> Self: ...
4389
4984
  @overload
4390
- def __init__(self, real: _ConvertibleToComplex | None = ..., /) -> None: ...
4985
+ def __new__(cls, real: _ConvertibleToComplex | None = 0, /) -> Self: ...
4391
4986
 
4392
4987
  @property
4393
- def real(self) -> floating[_NBit1]: ... # type: ignore[override]
4988
+ def real(self) -> floating[_NBit1]: ...
4394
4989
  @property
4395
- def imag(self) -> floating[_NBit2]: ... # type: ignore[override]
4990
+ def imag(self) -> floating[_NBit2]: ...
4396
4991
 
4397
4992
  # NOTE: `__complex__` is technically defined in the concrete subtypes
4398
4993
  def __complex__(self, /) -> complex: ...
@@ -4471,18 +5066,7 @@ class complexfloating(inexact[_NBit1, complex], Generic[_NBit1, _NBit2]):
4471
5066
 
4472
5067
  complex64: TypeAlias = complexfloating[_32Bit, _32Bit]
4473
5068
 
4474
- class complex128(complexfloating[_64Bit, _64Bit], complex): # type: ignore[misc]
4475
- @overload
4476
- def __new__(
4477
- cls,
4478
- real: complex | SupportsComplex | SupportsFloat | SupportsIndex = ...,
4479
- imag: complex | SupportsFloat | SupportsIndex = ...,
4480
- /,
4481
- ) -> Self: ...
4482
- @overload
4483
- def __new__(cls, real: _ConvertibleToComplex | None = ..., /) -> Self: ...
4484
-
4485
- #
5069
+ class complex128(complexfloating[_64Bit, _64Bit], complex):
4486
5070
  @property
4487
5071
  def itemsize(self) -> L[16]: ...
4488
5072
  @property
@@ -4541,26 +5125,26 @@ class timedelta64(_IntegralMixin, generic[_TD64ItemT_co], Generic[_TD64ItemT_co]
4541
5125
  def nbytes(self) -> L[8]: ...
4542
5126
 
4543
5127
  @overload
4544
- def __init__(self, value: _TD64ItemT_co | timedelta64[_TD64ItemT_co], /) -> None: ...
5128
+ def __new__(cls, value: _TD64ItemT_co | timedelta64[_TD64ItemT_co], /) -> Self: ...
4545
5129
  @overload
4546
- def __init__(self: timedelta64[L[0]], /) -> None: ...
5130
+ def __new__(cls, /) -> timedelta64[L[0]]: ...
4547
5131
  @overload
4548
- def __init__(self: timedelta64[None], value: _NaTValue | None, format: _TimeUnitSpec, /) -> None: ...
5132
+ def __new__(cls, value: _NaTValue | None, format: _TimeUnitSpec, /) -> timedelta64[None]: ...
4549
5133
  @overload
4550
- def __init__(self: timedelta64[L[0]], value: L[0], format: _TimeUnitSpec[_IntTD64Unit] = ..., /) -> None: ...
5134
+ def __new__(cls, value: L[0], format: _TimeUnitSpec[_IntTD64Unit] = ..., /) -> timedelta64[L[0]]: ...
4551
5135
  @overload
4552
- def __init__(self: timedelta64[int], value: _IntLike_co, format: _TimeUnitSpec[_IntTD64Unit] = ..., /) -> None: ...
5136
+ def __new__(cls, value: _IntLike_co, format: _TimeUnitSpec[_IntTD64Unit] = ..., /) -> timedelta64[int]: ...
4553
5137
  @overload
4554
- def __init__(self: timedelta64[int], value: dt.timedelta, format: _TimeUnitSpec[_IntTimeUnit], /) -> None: ...
5138
+ def __new__(cls, value: dt.timedelta, format: _TimeUnitSpec[_IntTimeUnit], /) -> timedelta64[int]: ...
4555
5139
  @overload
4556
- def __init__(
4557
- self: timedelta64[dt.timedelta],
5140
+ def __new__(
5141
+ cls,
4558
5142
  value: dt.timedelta | _IntLike_co,
4559
5143
  format: _TimeUnitSpec[_NativeTD64Unit] = ...,
4560
5144
  /,
4561
- ) -> None: ...
5145
+ ) -> timedelta64[dt.timedelta]: ...
4562
5146
  @overload
4563
- def __init__(self, value: _ConvertibleToTD64, format: _TimeUnitSpec = ..., /) -> None: ...
5147
+ def __new__(cls, value: _ConvertibleToTD64, format: _TimeUnitSpec = ..., /) -> Self: ...
4564
5148
 
4565
5149
  # inherited at runtime from `signedinteger`
4566
5150
  def __class_getitem__(cls, type_arg: type | object, /) -> GenericAlias: ...
@@ -4713,10 +5297,35 @@ class timedelta64(_IntegralMixin, generic[_TD64ItemT_co], Generic[_TD64ItemT_co]
4713
5297
  @overload
4714
5298
  def __rfloordiv__(self, a: timedelta64, /) -> int64: ...
4715
5299
 
4716
- __lt__: _ComparisonOpLT[_TD64Like_co, _ArrayLikeTD64_co]
4717
- __le__: _ComparisonOpLE[_TD64Like_co, _ArrayLikeTD64_co]
4718
- __gt__: _ComparisonOpGT[_TD64Like_co, _ArrayLikeTD64_co]
4719
- __ge__: _ComparisonOpGE[_TD64Like_co, _ArrayLikeTD64_co]
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_: ...
4720
5329
 
4721
5330
  class datetime64(_RealMixin, generic[_DT64ItemT_co], Generic[_DT64ItemT_co]):
4722
5331
  @property
@@ -4725,25 +5334,25 @@ class datetime64(_RealMixin, generic[_DT64ItemT_co], Generic[_DT64ItemT_co]):
4725
5334
  def nbytes(self) -> L[8]: ...
4726
5335
 
4727
5336
  @overload
4728
- def __init__(self, value: datetime64[_DT64ItemT_co], /) -> None: ...
5337
+ def __new__(cls, value: datetime64[_DT64ItemT_co], /) -> Self: ...
4729
5338
  @overload
4730
- def __init__(self: datetime64[_AnyDT64Arg], value: _AnyDT64Arg, /) -> None: ...
5339
+ def __new__(cls, value: _AnyDT64Arg, /) -> datetime64[_AnyDT64Arg]: ...
4731
5340
  @overload
4732
- def __init__(self: datetime64[None], value: _NaTValue | None = ..., format: _TimeUnitSpec = ..., /) -> None: ...
5341
+ def __new__(cls, value: _NaTValue | None = ..., format: _TimeUnitSpec = ..., /) -> datetime64[None]: ...
4733
5342
  @overload
4734
- def __init__(self: datetime64[dt.datetime], value: _DT64Now, format: _TimeUnitSpec[_NativeTimeUnit] = ..., /) -> None: ...
5343
+ def __new__(cls, value: _DT64Now, format: _TimeUnitSpec[_NativeTimeUnit] = ..., /) -> datetime64[dt.datetime]: ...
4735
5344
  @overload
4736
- def __init__(self: datetime64[dt.date], value: _DT64Date, format: _TimeUnitSpec[_DateUnit] = ..., /) -> None: ...
5345
+ def __new__(cls, value: _DT64Date, format: _TimeUnitSpec[_DateUnit] = ..., /) -> datetime64[dt.date]: ...
4737
5346
  @overload
4738
- def __init__(self: datetime64[int], value: int | bytes | str | dt.date, format: _TimeUnitSpec[_IntTimeUnit], /) -> None: ...
5347
+ def __new__(cls, value: int | bytes | str | dt.date, format: _TimeUnitSpec[_IntTimeUnit], /) -> datetime64[int]: ...
4739
5348
  @overload
4740
- def __init__(
4741
- self: datetime64[dt.datetime], value: int | bytes | str | dt.date, format: _TimeUnitSpec[_NativeTimeUnit], /
4742
- ) -> None: ...
5349
+ def __new__(
5350
+ cls, value: int | bytes | str | dt.date, format: _TimeUnitSpec[_NativeTimeUnit], /
5351
+ ) -> datetime64[dt.datetime]: ...
4743
5352
  @overload
4744
- def __init__(self: datetime64[dt.date], value: int | bytes | str | dt.date, format: _TimeUnitSpec[_DateUnit], /) -> None: ...
5353
+ def __new__(cls, value: int | bytes | str | dt.date, format: _TimeUnitSpec[_DateUnit], /) -> datetime64[dt.date]: ...
4745
5354
  @overload
4746
- def __init__(self, value: bytes | str | dt.date | None, format: _TimeUnitSpec = ..., /) -> None: ...
5355
+ def __new__(cls, value: bytes | str | dt.date | None, format: _TimeUnitSpec = ..., /) -> Self: ...
4747
5356
 
4748
5357
  @overload
4749
5358
  def __add__(self: datetime64[_AnyDT64Item], x: int | integer | np.bool, /) -> datetime64[_AnyDT64Item]: ...
@@ -4813,18 +5422,43 @@ class datetime64(_RealMixin, generic[_DT64ItemT_co], Generic[_DT64ItemT_co]):
4813
5422
  @overload
4814
5423
  def __rsub__(self, x: datetime64, /) -> timedelta64: ...
4815
5424
 
4816
- __lt__: _ComparisonOpLT[datetime64, _ArrayLikeDT64_co]
4817
- __le__: _ComparisonOpLE[datetime64, _ArrayLikeDT64_co]
4818
- __gt__: _ComparisonOpGT[datetime64, _ArrayLikeDT64_co]
4819
- __ge__: _ComparisonOpGE[datetime64, _ArrayLikeDT64_co]
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_: ...
4820
5445
 
4821
- class flexible(_RealMixin, generic[_FlexibleItemT_co], Generic[_FlexibleItemT_co]): ...
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: ...
4822
5456
 
4823
5457
  class void(flexible[bytes | tuple[Any, ...]]):
4824
5458
  @overload
4825
- def __init__(self, value: _IntLike_co | bytes, /, dtype: None = None) -> None: ...
5459
+ def __new__(cls, value: _IntLike_co | bytes, /, dtype: None = None) -> Self: ...
4826
5460
  @overload
4827
- def __init__(self, value: Any, /, dtype: _DTypeLikeVoid) -> None: ...
5461
+ def __new__(cls, value: Any, /, dtype: _DTypeLikeVoid) -> Self: ...
4828
5462
 
4829
5463
  @overload
4830
5464
  def __getitem__(self, key: str | SupportsIndex, /) -> Any: ...
@@ -4836,7 +5470,7 @@ class void(flexible[bytes | tuple[Any, ...]]):
4836
5470
 
4837
5471
  class character(flexible[_CharacterItemT_co], Generic[_CharacterItemT_co]):
4838
5472
  @abstractmethod
4839
- def __init__(self, value: _CharacterItemT_co = ..., /) -> None: ...
5473
+ def __new__(cls) -> Self: ...
4840
5474
 
4841
5475
  # NOTE: Most `np.bytes_` / `np.str_` methods return their builtin `bytes` / `str` counterpart
4842
5476
 
@@ -4846,12 +5480,6 @@ class bytes_(character[bytes], bytes):
4846
5480
  @overload
4847
5481
  def __new__(cls, s: str, /, encoding: str, errors: str = ...) -> Self: ...
4848
5482
 
4849
- #
4850
- @overload
4851
- def __init__(self, o: object = ..., /) -> None: ...
4852
- @overload
4853
- def __init__(self, s: str, /, encoding: str, errors: str = ...) -> None: ...
4854
-
4855
5483
  #
4856
5484
  def __bytes__(self, /) -> bytes: ...
4857
5485
 
@@ -4861,12 +5489,6 @@ class str_(character[str], str):
4861
5489
  @overload
4862
5490
  def __new__(cls, value: bytes, /, encoding: str = ..., errors: str = ...) -> Self: ...
4863
5491
 
4864
- #
4865
- @overload
4866
- def __init__(self, value: object = ..., /) -> None: ...
4867
- @overload
4868
- def __init__(self, value: bytes, /, encoding: str = ..., errors: str = ...) -> None: ...
4869
-
4870
5492
  # See `numpy._typing._ufunc` for more concrete nin-/nout-specific stubs
4871
5493
  @final
4872
5494
  class ufunc:
@@ -5037,27 +5659,6 @@ bitwise_right_shift = right_shift
5037
5659
  permute_dims = transpose
5038
5660
  pow = power
5039
5661
 
5040
- class errstate:
5041
- def __init__(
5042
- self,
5043
- *,
5044
- call: _ErrCall = ...,
5045
- all: _ErrKind | None = ...,
5046
- divide: _ErrKind | None = ...,
5047
- over: _ErrKind | None = ...,
5048
- under: _ErrKind | None = ...,
5049
- invalid: _ErrKind | None = ...,
5050
- ) -> None: ...
5051
- def __enter__(self) -> None: ...
5052
- def __exit__(
5053
- self,
5054
- exc_type: type[BaseException] | None,
5055
- exc_value: BaseException | None,
5056
- traceback: TracebackType | None,
5057
- /,
5058
- ) -> None: ...
5059
- def __call__(self, func: _CallableT) -> _CallableT: ...
5060
-
5061
5662
  # TODO: The type of each `__next__` and `iters` return-type depends
5062
5663
  # on the length and dtype of `args`; we can't describe this behavior yet
5063
5664
  # as we lack variadics (PEP 646).