From 9be1f358921080a981b26c63db45a7e2a2931582 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 25 May 2024 15:39:08 +0200 Subject: Function name changed in polymatrix dependency --- sumofsquares/canon.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sumofsquares/canon.py b/sumofsquares/canon.py index 72cab7a..d4c4a24 100644 --- a/sumofsquares/canon.py +++ b/sumofsquares/canon.py @@ -8,7 +8,7 @@ from dataclasses import replace from typing import Sequence from typing_extensions import override -from polymatrix.expression.from_ import Expression, from_statemonad +from polymatrix.expression.from_ import Expression, from_state_monad from polymatrix.expressionstate import ExpressionState from polymatrix.statemonad import init_state_monad from polymatrix.polymatrix.mixins import PolyMatrixMixin @@ -99,7 +99,7 @@ class PutinarPSatz(Canonicalization): multiplier = c @ x.combinations(tuple(range(d +1))) return multiplier.apply(state) - return poly.from_statemonad(init_state_monad(make_multiplier_later)) + return poly.from_state_monad(init_state_monad(make_multiplier_later)) # TODO: rewrite this function, this is adapted from how it was done # previously, and it works but it's not efficient. @@ -184,9 +184,7 @@ class LogDet(Canonicalization): m = poly.v_stack((n * (n + 1) // 2, 1)) Z = poly.lower_triangular(opt_variable_from_name('Z_logdet', shape=m)) - # we call the new big matrix Q Q = poly.concatenate(((A, Z), (Z.T, Z.diag()))) - E = poly.h_stack((Z.diag(), poly.ones((n, 1)), u)) new_cost = - u.T.sum() -- cgit v1.2.1