PlanarEmbedding.remove_edges_from#

PlanarEmbedding.remove_edges_from(ebunch)[source]#

Remove all edges specified in ebunch.

Parameters:
ebunch: list or container of edge tuples

Each pair of half-edges between the nodes given in the tuples will be removed from the graph. The nodes can be passed as:

  • 2-tuples (u, v) half-edges (u, v) and (v, u).

  • 3-tuples (u, v, k) where k is ignored.

See also

remove_edge

remove a single edge

Notes

Will fail silently if an edge in ebunch is not in the graph.

Examples

>>> G = nx.path_graph(4)  # or DiGraph, MultiGraph, MultiDiGraph, etc
>>> ebunch = [(1, 2), (2, 3)]
>>> G.remove_edges_from(ebunch)