summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-05-05 11:29:49 +0200
committerNao Pross <np@0hm.ch>2024-05-05 11:29:49 +0200
commitf975c60c937bc04c48e36532c14a6df89b9c5365 (patch)
tree22f46d9be09752923dc589a49c50428a49f0c906
parentMake expressionstate partially backwards compatible (diff)
downloadpolymatrix-f975c60c937bc04c48e36532c14a6df89b9c5365.tar.gz
polymatrix-f975c60c937bc04c48e36532c14a6df89b9c5365.zip
Add __str__ to FromSympyExpr
-rw-r--r--polymatrix/expression/impl.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/polymatrix/expression/impl.py b/polymatrix/expression/impl.py
index 91bab0c..03b4c2c 100644
--- a/polymatrix/expression/impl.py
+++ b/polymatrix/expression/impl.py
@@ -174,6 +174,9 @@ class FromNumpyExprImpl(FromNumpyExprMixin):
class FromSympyExprImpl(FromSympyExprMixin):
data: sympy.Expr | sympy.Matrix | tuple[tuple[sympy.Expr]]
+ def __str__(self):
+ return f"FromSympy({self.data})"
+
@dataclassabc.dataclassabc(frozen=True)
class FromSymmetricMatrixExprImpl(FromSymmetricMatrixExprMixin):