A set of diffusion related graph algorithms for Python, including community detection, node ranking, and graph sampling. Current version 0.4.8. Low release cadence.
pip install graph-libNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Detect two communities in Zachary's karate club graph using spectral partitioning.
Replace graph_lib.diffusion_map(G) with graph_lib.spectral_embedding(G, n_components=None)
Use 'import graph_lib' or 'from graph_lib import ...'
Ensure node labels are integers, e.g., G = nx.convert_node_labels_to_integers(G)
pip install graph-lib and then import graph_lib (with underscore).
Relabel nodes to integers: G = nx.convert_node_labels_to_integers(G)
Use graph_lib.spectral_embedding(G, n_components=None) instead.