Update div operator

This commit is contained in:
linarphy 2024-05-27 16:40:47 +02:00
parent 4c322603d3
commit 834126e0d6
No known key found for this signature in database
GPG key ID: E61920135EFF2295

View file

@ -285,12 +285,12 @@ class Signal:
def __rmul__(self, other: ArrayLike | "Signal") -> "Signal":
return self * other
def __div__(self, other: ArrayLike | "Signal") -> "Signal":
def __truediv__(self, other: ArrayLike | "Signal") -> "Signal":
if isinstance(other, Signal):
return self.operator_signal(other, "/")
return self.operator_arraylike(other, "/")
def __rdiv__(self, other: ArrayLike | "Signal") -> "Signal":
def __rtruediv__(self, other: ArrayLike | "Signal") -> "Signal":
if isinstance(other, Signal):
return other.operator_signal(self, "/")
return self.roperator_arraylike(other, "/")