networkx.create_empty_copy

networkx.create_empty_copy(G, with_data=True)[source]

Return a copy of the graph G with all of the edges removed.

Parameters:

G : graph

A NetworkX graph

with_data : bool (default=True)

Propagate Graph and Nodes data to the new graph.

See Also

—–

empty_graph