diff options
author | Nao Pross <np@0hm.ch> | 2024-04-25 17:28:01 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-04-25 17:28:01 +0200 |
commit | 9245e474b8075d6e88b7550d60cf63097de8cf00 (patch) | |
tree | d4b08b558f3aa056bb34b255112ecd44de450f56 | |
parent | Create partial order of MonomialIndex wrt degree of monomial (diff) | |
download | polymatrix-9245e474b8075d6e88b7550d60cf63097de8cf00.tar.gz polymatrix-9245e474b8075d6e88b7550d60cf63097de8cf00.zip |
Fix incorrect behaviour of init_variable_expr
-rw-r--r-- | polymatrix/expression/from_.py | 2 | ||||
-rw-r--r-- | polymatrix/expression/init.py | 3 |
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) |