Do you mean A = csc_matrix(A) and the belows can be removed?