summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-04-25 17:28:01 +0200
committerNao Pross <np@0hm.ch>2024-04-25 17:28:01 +0200
commit9245e474b8075d6e88b7550d60cf63097de8cf00 (patch)
treed4b08b558f3aa056bb34b255112ecd44de450f56
parentCreate partial order of MonomialIndex wrt degree of monomial (diff)
downloadpolymatrix-9245e474b8075d6e88b7550d60cf63097de8cf00.tar.gz
polymatrix-9245e474b8075d6e88b7550d60cf63097de8cf00.zip
Fix incorrect behaviour of init_variable_expr
-rw-r--r--polymatrix/expression/from_.py2
-rw-r--r--polymatrix/expression/init.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/polymatrix/expression/from_.py b/polymatrix/expression/from_.py
index c833e8b..af11d49 100644
--- a/polymatrix/expression/from_.py
+++ b/polymatrix/expression/from_.py
@@ -39,7 +39,7 @@ def from_(
def from_names(names: str, shape: tuple[int, int] = (1,1)) -> tuple[VariableMixin] | VariableMixin:
""" Construct one or multiple variables from comma separated a list of names. """
- variables = tuple(init_variable_expr(name.strip(), shape)
+ variables = tuple(init_expression(underlying=init_variable_expr(name.strip(), shape))
for name in names.split(","))
if len(variables) == 1:
diff --git a/polymatrix/expression/init.py b/polymatrix/expression/init.py
index 4959e11..5acb40d 100644
--- a/polymatrix/expression/init.py
+++ b/polymatrix/expression/init.py
@@ -527,5 +527,4 @@ def init_truncate_expr(
def init_variable_expr(name: str, shape: tuple[int, int] = (1, 1)):
- return polymatrix.expression.expression.init_expression(
- underlying=polymatrix.expression.impl.VariableImpl(name, shape))
+ return polymatrix.expression.impl.VariableImpl(name, shape)