- graphscope.nx.classes.function.edge_subgraph(G, edges)#
Returns a independent deep copy subgraph induced by the specified edges.
The induced subgraph contains each edge in edges and each node incident to any of those edges.
G (NetworkX Graph) –
edges (iterable) – An iterable of edges. Edges not present in G are ignored.
subgraph – A edge-induced subgraph of subgraph of G.
- Return type:
>>> G = nx.path_graph(5) >>> H = G.edge_subgraph([(0, 1), (3, 4)]) >>> list(H.nodes) [0, 1, 3, 4] >>> list(H.edges) [(0, 1), (3, 4)]