NetworkX

Previous topic

networkx.Graph.add_edges_from

Next topic

networkx.Graph.remove_edges_from

Quick search

networkx.Graph.remove_edge

Graph.remove_edge(u, v)

Remove the edge between (u,v).

Parameters:u,v: nodes :

See also

remove_edges_from
remove a collection of edges

Examples

>>> G=nx.path_graph(4)
>>> G.remove_edge(0,1)
>>> e=(1,2)
>>> G.remove_edge(*e) # unpacks e from an edge tuple
>>> e=(2,3,'data')
>>> G.remove_edge(*e[:2]) # edge tuple with data