Skip to content

Commit

Permalink
Deal with NumPy 2.0 compatibility breaker in gurobi interface (cvxpy#…
Browse files Browse the repository at this point in the history
…2484)

* Remove NumPy 2.0 incompatibility

* Update cvxpy/reductions/solvers/qp_solvers/gurobi_qpif.py

---------

Co-authored-by: Philipp Schiele <[email protected]>
  • Loading branch information
rluce and phschiele authored Jun 23, 2024
1 parent 6691e43 commit 13c10b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cvxpy/reductions/solvers/qp_solvers/gurobi_qpif.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def solve_via_data(self, data, warm_start: bool, verbose: bool, solver_opts, sol
x_grb[idx].start = data['init_value'][idx]
model.update()

x = np.array(model.getVars(), copy=False)
x = np.asarray(model.getVars())

if A.shape[0] > 0:
if hasattr(model, 'addMConstr'):
Expand Down

0 comments on commit 13c10b1

Please sign in to comment.