Skip to content

Commit

Permalink
[test] parallel_qp_solve : .toarray() to C order
Browse files Browse the repository at this point in the history
  • Loading branch information
ManifoldFR committed Aug 7, 2024
1 parent 62b9ea4 commit 9c8b57b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/src/parallel_qp_solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def generate_mixed_qp(n, seed=1):
P = spa.coo_matrix(P)
# print("sparsity of P : {}".format((P.nnz) / (n**2)))
q = np.random.randn(n)
A = spa.random(m, n, density=0.95, data_rvs=np.random.randn, format="csc").toarray()
A = spa.random(m, n, density=0.95, data_rvs=np.random.randn, format="csc").toarray(order='C')
v = np.random.randn(n) # Fictitious solution
delta = np.random.rand(m) # To get inequality
u = A @ v
l = -1.0e20 * np.ones(m)

return P.toarray(), q, A[:n_eq, :], u[:n_eq], A[n_in:, :], u[n_in:], l[n_in:]
return P.toarray(order='C'), q, A[:n_eq, :], u[:n_eq], A[n_in:, :], u[n_in:], l[n_in:]


class ParallelWrapper(unittest.TestCase):
Expand Down

0 comments on commit 9c8b57b

Please sign in to comment.