This documents the development version of NetworkX. Documentation for the current release can be found here.
Returns the number of weakly connected components in G.
- GNetworkX graph
A directed graph.
Number of weakly connected components
If G is undirected.
For directed graphs only.