igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Python: Converting large, sparse network from Scipy to Igraph


From: Jeff Alstott
Subject: [igraph] Python: Converting large, sparse network from Scipy to Igraph
Date: Wed, 3 Jul 2013 11:10:07 -0400

I have a large (>50,000 node) weighted, directed network, which is sparse. It is currently in Scipy's sparse matrix format:

type(data)
scipy.sparse.csc.csc_matrix

So it's not big at all.

However, my typical way of getting these matrices into igraph has been:

g = Graph.Weighted_Adjacency( data.toarray().tolist() )

data.toarray() converts the sparse matrix to dense/full format, which blows my memory out of the water. What ought I to be doing?

Thanks!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]