summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-05-11 16:15:49 +0200
committerNao Pross <np@0hm.ch>2024-05-11 16:15:49 +0200
commitb1b2871e87057b93b444f35aef5ffcc44ac99786 (patch)
tree59853b0e012273623dd3191e6da0a25e78c3fdb4
parentFix bug in putinar_psatz (diff)
downloadsumofsquares-b1b2871e87057b93b444f35aef5ffcc44ac99786.tar.gz
sumofsquares-b1b2871e87057b93b444f35aef5ffcc44ac99786.zip
Bugfix in CVXOpt interface when problem is QP
Diffstat (limited to '')
-rw-r--r--sumofsquares/solver/cvxopt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sumofsquares/solver/cvxopt.py b/sumofsquares/solver/cvxopt.py
index c4e1db3..7be4e0d 100644
--- a/sumofsquares/solver/cvxopt.py
+++ b/sumofsquares/solver/cvxopt.py
@@ -78,7 +78,7 @@ def solve_sos_cone(prob: Problem, verbose: bool = False,
# cost quadratic term
if is_qp:
- n = len(prob.variables)
+ n = len(variable_indices)
P = np.zeros((n, n))
# This works because of how monomial indices are sorted
# see also polymatrix.index.MonomialIndex.__lt__