networkx 2.8.2 Pypi GitHub Homepage
Other Docs
ParametersRaisesBackRef
remove_edge(self, u, v)

Parameters

u, v : nodes

Remove the edge between nodes u and v.

Raises

NetworkXError

If there is not an edge between u and v.

Remove the edge between u and v.

See Also

remove_edges_from

remove a collection of edges

Examples

>>> G = nx.Graph()  # or DiGraph, etc
... nx.add_path(G, [0, 1, 2, 3])
... G.remove_edge(0, 1)
... e = (1, 2)
... G.remove_edge(*e) # unpacks e from an edge tuple
... e = (2, 3, {"weight": 7}) # an edge with attribute data
... G.remove_edge(*e[:2]) # select first part of edge tuple
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.classes.digraph.DiGraph.remove_edges_from networkx.algorithms.components.strongly_connected.is_strongly_connected networkx.algorithms.tournament.is_strongly_connected networkx.algorithms.tree.recognition.is_branching networkx.algorithms.tree.recognition.is_arborescence

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/classes/digraph.py#711
type: <class 'function'>
Commit: