NetworkX

Previous topic

networkx.LabeledDiGraph.order

Next topic

networkx.LabeledDiGraph.__len__

Quick search

networkx.LabeledDiGraph.number_of_nodes

LabeledDiGraph.number_of_nodes()

Return the number of nodes.

Notes

This is the same as

>>> len(G)
4

and

>>> G.order()
4

Examples

>>> G=nx.path_graph(4)
>>> print len(G)
4