Graph.count_connected_components

Graph.count_connected_components()[source]

Counts connected components, and the component id of each address.

Returns:

(num_components, component_labels)

Raises:

ValueError – If the graph is not single.

Return type:

tuple[int, ndarray]