Naive sparse matrix implementation was much slower than scipy.coo_matrix. Reverted changes