kinbaku.Graph.subgraph

Graph.subgraph(nodes, weight=None)[source]

Return adjacency matrix of a subgraph

Parameters
  • nodes (list) – subset of nodes to consider for the subgraph

  • weight (str) – NOT IMPLEMENTED! Weight attribute

Returns

sparse matrix representing the subgraph

Return type

scipy.sparse.csr_matrix