From 27fd9a0c5fb36e2a531b44d01160c11fc42b1d66 Mon Sep 17 00:00:00 2001 From: Tobia Marcucci Date: Mon, 1 Dec 2025 10:01:28 -0800 Subject: [PATCH 1/3] Tries cvxpy 1.7.4 --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2030785..7dec9e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ numpy -cvxpy >=1.5, <=1.7.1 +cvxpy >=1.5 pytest \ No newline at end of file diff --git a/setup.py b/setup.py index 837f1cc..0f5c4ca 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ packages=find_packages(), install_requires=[ "numpy", - "cvxpy >=1.5, <=1.7.1", + "cvxpy >=1.5", "pytest", ], ) From 1485b84ea99ddfbfd380fb20101e5c435a836de5 Mon Sep 17 00:00:00 2001 From: Tobia Marcucci Date: Mon, 1 Dec 2025 10:15:28 -0800 Subject: [PATCH 2/3] Tries a fix --- gcsopt/programs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcsopt/programs.py b/gcsopt/programs.py index ccc1e8b..77598c4 100644 --- a/gcsopt/programs.py +++ b/gcsopt/programs.py @@ -216,12 +216,12 @@ def to_conic(self): conic_program = ConicProgram(cp_conic.x.size, id_to_range, self.binary_variable) # Define cost of conic program. - cd = cp_conic.c.toarray().flatten() + cd = cp_conic.q.toarray().flatten() conic_program.add_cost(cd[:-1], cd[-1]) # Define constraints of conic program. Sparse matrices are converted to # dense arrays, since keeping them sparse seems to make things slower. - cols = cp_conic.c.shape[0] + cols = cp_conic.q.shape[0] Ab = cp_conic.A.toarray().reshape((-1, cols), order='F') K = [(type(c), c.size) for c in cp_conic.constraints] conic_program.add_constraints(Ab[:, :-1], Ab[:, -1], K) @@ -234,4 +234,4 @@ def solve(self, **kwargs): """ prob = cp.Problem(cp.Minimize(self.cost), self.constraints) prob.solve(**kwargs) - return prob.value \ No newline at end of file + return prob.value From cc706f6c839d2ec5a453c913acdbcf6448f84523 Mon Sep 17 00:00:00 2001 From: Tobia Marcucci Date: Mon, 1 Dec 2025 10:33:00 -0800 Subject: [PATCH 3/3] Updates cvxpy version --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7dec9e2..5de61e5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ numpy -cvxpy >=1.5 +cvxpy >=1.7.4 pytest \ No newline at end of file diff --git a/setup.py b/setup.py index 0f5c4ca..8475c61 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ packages=find_packages(), install_requires=[ "numpy", - "cvxpy >=1.5", + "cvxpy >=1.7.4", "pytest", ], )