diff options
Diffstat (limited to '')
-rw-r--r-- | sumofsquares/canon.py | 6 |
1 files 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() |