networkx/networkx — pull request #913 by harrymvr (2013-07-24 22:02:01+00:00)
Title: Add the option to export the incidence matrix in sparse format

The incidence matrix is huge in size (#nodes x #edges) but really sparse, since there are only two non-zeros elements per column. The way the code is right now does not allow to export the incidence matrix of a large graph (million nodes by million edges) as it initializes the result as a dense matrix full of zeros. However, using a sparse representation, as the one in scipy.sparse.lil_matrix, would make it work.