From 9245e474b8075d6e88b7550d60cf63097de8cf00 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Thu, 25 Apr 2024 17:28:01 +0200 Subject: Fix incorrect behaviour of init_variable_expr --- polymatrix/expression/from_.py | 2 +- 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) -- cgit v1.2.1