3 from scipy.sparse
import csc_matrix
8 rng = np.random.default_rng()
10 A = rng.random((dim, dim))
11 A = (A + A.T) * 0.5 + np.diag(10.0 + rng.random(dim))
15 llt = eigenpy.SimplicialLLT(A)
17 assert llt.info() == eigenpy.ComputationInfo.Success
25 X = rng.random((dim, 20))
33 permutation = llt.permutationP()
35 X_sparse = scipy.sparse.random(dim, 10)
36 B_sparse = A.dot(X_sparse)
37 B_sparse = B_sparse.tocsc(
True)
39 if not B_sparse.has_sorted_indices:
40 B_sparse.sort_indices()
42 X_est = llt.solve(B_sparse)