summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-05-25 15:39:08 +0200
committerNao Pross <np@0hm.ch>2024-05-25 15:39:08 +0200
commit9be1f358921080a981b26c63db45a7e2a2931582 (patch)
treea3172f237fe254c23685af5a22f60c426167d09b
parentAdd comments (diff)
downloadsumofsquares-9be1f358921080a981b26c63db45a7e2a2931582.tar.gz
sumofsquares-9be1f358921080a981b26c63db45a7e2a2931582.zip
Function name changed in polymatrix dependency
Diffstat (limited to '')
-rw-r--r--sumofsquares/canon.py6
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()