diff options
-rw-r--r-- | polymatrix/expression/__init__.py | 2 | ||||
-rw-r--r-- | polymatrix/expression/impl.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/polymatrix/expression/__init__.py b/polymatrix/expression/__init__.py index b150cc5..f8b5b74 100644 --- a/polymatrix/expression/__init__.py +++ b/polymatrix/expression/__init__.py @@ -17,7 +17,7 @@ def v_stack( if isinstance(expr, Expression): yield expr.underlying else: - yield polymatrix.expression.from_.from_(expr) + yield polymatrix.expression.from_.from_(expr).underlying return init_expression( underlying=polymatrix.expression.impl.VStackExprImpl( diff --git a/polymatrix/expression/impl.py b/polymatrix/expression/impl.py index ad09853..0ddda2e 100644 --- a/polymatrix/expression/impl.py +++ b/polymatrix/expression/impl.py @@ -102,6 +102,11 @@ class CombinationsExprImpl(CombinationsExprMixin): expression: ExpressionBaseMixin degrees: tuple[int, ...] + def __str__(self): + if len(self.degrees) == 1: + return f"combinations({self.expression}, {self.degrees[0]})" + return f"combinations({self.expression}, {self.degrees})" + @dataclassabc.dataclassabc(frozen=True) class DerivativeExprImpl(DerivativeExprMixin): |