graphscope.experimental.nx.DiGraph.remove_node

DiGraph.remove_node(n)

Remove node n.

Removes the node n and all adjacent edges.

Parameters

n (node) – If the node is not in the graph it is silently ignored.

Examples

>>> G = nx.path_graph(3)  # or DiGraph
>>> list(G.edges)
[(0, 1), (1, 2)]
>>> G.remove_node(1)
>>> list(G.edges)
[]