diff options
author | Nao Pross <np@0hm.ch> | 2024-05-25 15:39:08 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-05-25 15:39:08 +0200 |
commit | 9be1f358921080a981b26c63db45a7e2a2931582 (patch) | |
tree | a3172f237fe254c23685af5a22f60c426167d09b | |
parent | Add comments (diff) | |
download | sumofsquares-9be1f358921080a981b26c63db45a7e2a2931582.tar.gz sumofsquares-9be1f358921080a981b26c63db45a7e2a2931582.zip |
Function name changed in polymatrix dependency
-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() |