D_i,i = -sum_(l for l ≠ i) L_i,l
where
L ∈ ℝ^(n×n) sparse
produces Python code which accesses elements of L via L.tocsr()[i-1, l-1] in a loop. There should instead of an L = L.tocsr() outside the loop, since the CSR conversion would be slow (unless it's already in CSR format).
Create by @yig:
This I❤️LA code:
produces Python code which accesses elements of L via
L.tocsr()[i-1, l-1]
in a loop. There should instead of anL = L.tocsr()
outside the loop, since the CSR conversion would be slow (unless it's already in CSR format).