NetworkX

Previous topic

networkx.DiGraph.add_edges_from

Next topic

networkx.DiGraph.remove_edges_from

Quick search

networkx.DiGraph.remove_edge

DiGraph.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