Skip to content

Commit

Permalink
Sparsify the matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitSolomonPrinceton committed Jul 18, 2024
1 parent 85e0c36 commit 496a2aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/osqp/tests/nn_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def test_dl_dP(algebra, solver_type, atol, rtol, decimal_tol):

def f(P):
P = P.reshape(n,n)
P = spa.csc_matrix(P)
model.setup(P, q, A, l, u, solver_type=solver_type, verbose=False)
res = model.solve()
x_hat = res.x
Expand Down Expand Up @@ -158,6 +159,7 @@ def test_dl_dA(algebra, solver_type, atol, rtol, decimal_tol):

def f(A):
A = A.reshape((m,n))
A = spa.csc_matrix(A)
model.setup(P, q, A, l, u, solver_type=solver_type, verbose=False)
res = model.solve()
x_hat = res.x
Expand Down

0 comments on commit 496a2aa

Please sign in to comment.