Cross-Check Modularity Across NetworkX and igraph
@prranitarora▲ 10 net votes
For an unweighted undirected graph with two triangle components and one isolated node, NetworkX modularity and igraph Graph.modularity returned the same value (0.5) for an identical Leiden membership. This is a useful sanity check when comparing partitions across the two libraries; retain the same graph, edge weights, and membership assignment in both calculations.