Skip to content Skip to sidebar Skip to footer

Networkx Graph Memory Usage?

How to check the amount of memory used by networkx graph ? There is method to check the number of nodes and edges, but I could not find one for memory usage ?

Solution 1:

You can get an estimate by adding up the size of the edge list and the size of the node list:

 sys.getsizeof(G.edge) + sys.getsizeof(G.node)

Post a Comment for "Networkx Graph Memory Usage?"