summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-06-07 18:14:31 +0200
committerNao Pross <np@0hm.ch>2024-06-07 18:14:31 +0200
commit58f6f675b48a4e9f57126a92be6acbe1c757fe1d (patch)
tree59dbe335a41b0950a882e194b0f2deba205ff5a8
parentAvoid using unpack operator in subscript for backwards compatibility (diff)
downloadpolymatrix-58f6f675b48a4e9f57126a92be6acbe1c757fe1d.tar.gz
polymatrix-58f6f675b48a4e9f57126a92be6acbe1c757fe1d.zip
Add more __str__ methods to expression mixins
-rw-r--r--polymatrix/expression/impl.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/polymatrix/expression/impl.py b/polymatrix/expression/impl.py
index 81a624e..0a60fb8 100644
--- a/polymatrix/expression/impl.py
+++ b/polymatrix/expression/impl.py
@@ -490,11 +490,17 @@ class SumExprImpl(SumExprMixin):
class SymmetricExprImpl(SymmetricExprMixin):
underlying: ExpressionBaseMixin
+ def __str__(self):
+ return f"symmetric({self.underlying})"
+
@dataclassabc.dataclassabc(frozen=True)
class ToConstantExprImpl(ToConstantExprMixin):
underlying: ExpressionBaseMixin
+ def __str__(self):
+ return f"ToCostant({self.underlying})"
+
@dataclassabc.dataclassabc(frozen=True)
class ToSortedVariablesImpl(ToSortedVariablesExprMixin):