diff options
Diffstat (limited to '')
-rw-r--r-- | polymatrix/expression/expression.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/polymatrix/expression/expression.py b/polymatrix/expression/expression.py index abe37aa..415f16f 100644 --- a/polymatrix/expression/expression.py +++ b/polymatrix/expression/expression.py @@ -99,6 +99,12 @@ class Expression(ExpressionBaseMixin, ABC): def __sub__(self, other): return self + (-other) + def __truediv__(self, other): + if not isinstance(other, float | int): + return NotImplemented + + return (1 / other) * self + @abstractmethod def copy(self, underlying: ExpressionBaseMixin) -> "Expression": ... |