diff options
Diffstat (limited to 'sumofsquares/sosexprbase/init')
-rw-r--r-- | sumofsquares/sosexprbase/init/initsosexprbase.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sumofsquares/sosexprbase/init/initsosexprbase.py b/sumofsquares/sosexprbase/init/initsosexprbase.py index 9dade7e..f8f97fd 100644 --- a/sumofsquares/sosexprbase/init/initsosexprbase.py +++ b/sumofsquares/sosexprbase/init/initsosexprbase.py @@ -47,9 +47,12 @@ def init_param_sos_expr_base( param_matrix = param.T else: - params = tuple(monom.parametrize(f'{name}_{row+1}_{col+1}') for col in range(n_col) for row in range(n_row)) - param = polymatrix.v_stack(params) - param_matrix = polymatrix.v_stack(tuple(param.T for param in params)) + param = monom.rep_mat(n_col * n_row, 1).parametrize(f'{name}') + param_matrix = param.reshape(monom, -1).T + + # params = tuple(monom.parametrize(f'{name}_{row+1}_{col+1}') for col in range(n_col) for row in range(n_row)) + # param = polymatrix.v_stack(params) + # param_matrix = polymatrix.v_stack(tuple(param.T for param in params)) return ParamSOSExprBaseImpl( name=name, |