From 9c8b57bae6a71a7f61d9206bbc1b71ae08915667 Mon Sep 17 00:00:00 2001 From: ManifoldFR Date: Wed, 7 Aug 2024 12:19:33 +0200 Subject: [PATCH] [test] parallel_qp_solve : .toarray() to C order --- test/src/parallel_qp_solve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/src/parallel_qp_solve.py b/test/src/parallel_qp_solve.py index 4ea203569..99f10cb69 100644 --- a/test/src/parallel_qp_solve.py +++ b/test/src/parallel_qp_solve.py @@ -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):