diff options
author | Nao Pross <np@0hm.ch> | 2024-06-07 18:14:31 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-06-07 18:14:31 +0200 |
commit | 58f6f675b48a4e9f57126a92be6acbe1c757fe1d (patch) | |
tree | 59dbe335a41b0950a882e194b0f2deba205ff5a8 | |
parent | Avoid using unpack operator in subscript for backwards compatibility (diff) | |
download | polymatrix-58f6f675b48a4e9f57126a92be6acbe1c757fe1d.tar.gz polymatrix-58f6f675b48a4e9f57126a92be6acbe1c757fe1d.zip |
Add more __str__ methods to expression mixins
Diffstat (limited to '')
-rw-r--r-- | polymatrix/expression/impl.py | 6 |
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): |