induced_subgraph
Returns a subgraph of g that contains only the nodes that are listed in the nodes_subset parameter.
sasviya.network.utils.utils.induced_subgraph(g, nodes_subset, immutable=None, *, data=True)
Parameters
- g : SAS graph object
-
Specifies the input graph to assess.
- nodes_subset : list (or any container) of nodes
-
Specifies the subset of nodes.
- immutable : bool or None, optional
-
Specifies whether or not to return an immutable copy. The default is None, which means that the mutability matches the input graph.
- data : bool, optional
-
Specifies whether or not to retain attributes. The default is True, meaning that the node and edge attributes of the graph are retained.
Returns
- SAS graph object
-
Returns the induced subgraph.
Last updated: July 28, 2026