I'm trying to use cholesky decomposition in python, with numpy (np) and scikits (sci) libraries. Assume that D is sparse (using csc_matrix). The results of the following two lines are different
L1 = csc_matrix(np.linalg.cholesky(D.todense()));
L2 = sci.sparse.cholmod.cholesky(D).L();
Actually when I use
print np.allclose(np.dot(L1.todense(),L1.todense().T), D.todense())
print np.allclose(np.dot(L2.todense(),L2.todense().T), D.todense())
I have true for L1 and false for L2.
D is Hermitian and pos_def. Can someone please help me to figure out what is wrong with my implementation.