Skip to content

Commit 967c11e

Browse files
committed
ObjectArray: use complex for scalars
1 parent ceed8a5 commit 967c11e

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

pytools/obj_array.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,55 +203,55 @@ def __add__(self, other: Self, /) -> Self: ...
203203
@overload
204204
def __add__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
205205
@overload
206-
def __add__(self, other: float, /) -> Self: ...
206+
def __add__(self, other: complex, /) -> Self: ...
207207
@overload
208208
def __radd__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
209209
@overload
210-
def __radd__(self, other: float, /) -> Self: ...
210+
def __radd__(self, other: complex, /) -> Self: ...
211211

212212
@overload
213213
def __sub__(self, other: Self, /) -> Self: ...
214214
@overload
215215
def __sub__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
216216
@overload
217-
def __sub__(self, other: float, /) -> Self: ...
217+
def __sub__(self, other: complex, /) -> Self: ...
218218
@overload
219219
def __rsub__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
220220
@overload
221-
def __rsub__(self, other: float, /) -> Self: ...
221+
def __rsub__(self, other: complex, /) -> Self: ...
222222

223223
@overload
224224
def __mul__(self, other: Self, /) -> Self: ...
225225
@overload
226226
def __mul__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
227227
@overload
228-
def __mul__(self, other: float, /) -> Self: ...
228+
def __mul__(self, other: complex, /) -> Self: ...
229229
@overload
230230
def __rmul__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
231231
@overload
232-
def __rmul__(self, other: float, /) -> Self: ...
232+
def __rmul__(self, other: complex, /) -> Self: ...
233233

234234
@overload
235235
def __truediv__(self, other: Self, /) -> Self: ...
236236
@overload
237237
def __truediv__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
238238
@overload
239-
def __truediv__(self, other: float, /) -> Self: ...
239+
def __truediv__(self, other: complex, /) -> Self: ...
240240
@overload
241241
def __rtruediv__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
242242
@overload
243-
def __rtruediv__(self, other: float, /) -> Self: ...
243+
def __rtruediv__(self, other: complex, /) -> Self: ...
244244

245245
@overload
246246
def __pow__(self, other: Self, /) -> Self: ...
247247
@overload
248248
def __pow__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
249249
@overload
250-
def __pow__(self, other: float, /) -> Self: ...
250+
def __pow__(self, other: complex, /) -> Self: ...
251251
@overload
252252
def __rpow__(self, other: T, /) -> Self: ... # pyright: ignore[reportGeneralTypeIssues]
253253
@overload
254-
def __rpow__(self, other: float, /) -> Self: ...
254+
def __rpow__(self, other: complex, /) -> Self: ...
255255

256256
@overload
257257
def __matmul__(

0 commit comments

Comments
 (0)