Registry / data / graspologic

graspologic

JSON →
library3.4.4pypypiunverified

graspologic is a Python library for graph statistics, including estimation of latent position graphs, graph matching, and spectral embedding. Current version is 3.4.4, supporting Python 3.9 to <3.13. Release cadence is irregular, with several minor releases per year.

pip install graspologic
INSTALL
IMPORT
SIG · GRASPOLOGIC
G
graspologic
datapythonv3.4.4
Install
27.6s avg
Import
45158ms
Disk
802MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.4.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 27.1s
py 3.11
✕ build_error
✓ 26.3s
py 3.12
✕ build_error
✓ 26.6s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 30.5s
802MB installed
● package 802MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AdjacencySpectralEmbed
from graspologic.embed import AdjacencySpectralEmbed
Standard import path for spectral embedding.
LaplacianSpectralEmbed
from graspologic.embed import LaplacianSpectralEmbed
Standard import path for Laplacian spectral embedding.
GaussianCluster
from graspologic.cluster import GaussianCluster
Standard import path for Gaussian clustering.
graspologic
import graspologic
Top-level import does not expose most functions; you must import submodules.

Quickstart: generate an Erdős–Rényi graph and compute an adjacency spectral embedding.

import numpy as np from graspologic.embed import AdjacencySpectralEmbed from graspologic.simulations import er_np # Generate a random graph adj = er_np(100, 0.3) # Embed the adjacency matrix ase = AdjacencySpectralEmbed(n_components=2) X = ase.fit_transform(adj) print(X.shape) # (100, 2)
Debug
Known issues
breakingIn graspologic 3.x, the old 'graspologic.embed' submodule API changed: some functions now return objects instead of tuples. Code from 2.x may break if you unpack results directly.
fix
Check return types: use .fit_transform() method on embedding classes, not standalone functions.
affects: >=3.0.0
deprecatedThe function 'graspologic.plot.heatmap' is deprecated and will be removed in a future release. Use matplotlib directly instead.
fix
Replace with matplotlib.pyplot.imshow() or seaborn.heatmap().
affects: >=3.3.0
gotchaImporting 'graspologic' alone (without submodules) does not import embedding or clustering functions. You must import specific submodules like 'graspologic.embed'.
fix
Use from graspologic.embed import ... or import graspologic.embed as ge
affects: all
gotchaThe 'hyppo' library is an optional dependency; if not installed, some independence test functions will raise ImportError at runtime.
fix
Install with 'pip install graspologic[stats]' to include hyppo.
affects: >=3.4.0
breakingPython 3.13 support is not yet available; graspologic requires Python <3.13.
fix
Use Python 3.9–3.12.
affects: >=3.4.0
Upgrade
Version history
3.4.4latest on PyPI · released Sep 8, 2025
Audit
Dependencies
networkxrequiredgraph data structures and algorithms
numpyrequirednumerical computations
scikit-learnrequiredused in clustering and other utilities
hyppooptionalindependence testing (optional for some functions)
POToptionaloptimal transport (optional)
Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
graspologic — pip install graspologic · libregistry