NetworkX

Previous topic

networkx.MultiDiGraph.add_cycle

Next topic

networkx.MultiDiGraph.nodes

Quick search

networkx.MultiDiGraph.clear

MultiDiGraph.clear()

Remove all nodes and edges.

This also removes the name.

Examples

>>> G=nx.path_graph(4)
>>> G.clear()
>>> G.nodes()
[]
>>> G.edges()
[]