retworkx.number_weakly_connected_components¶ number_weakly_connected_components(graph, /)¶ Find the number of weakly connected components in a DAG. Parameters graph (PyDiGraph) – The graph to find the number of weakly connected components on Returns The number of weakly connected components in the DAG Return type int