{"id":21399,"library":"graspologic","title":"Graspologic","description":"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.","status":"active","version":"3.4.4","language":"python","source_language":"en","source_url":"https://github.com/graspologic-org/graspologic","tags":["graph statistics","spectral embedding","network analysis","community detection"],"install":[{"cmd":"pip install graspologic","lang":"bash","label":"install from PyPI"}],"dependencies":[{"reason":"graph data structures and algorithms","package":"networkx","optional":false},{"reason":"numerical computations","package":"numpy","optional":false},{"reason":"used in clustering and other utilities","package":"scikit-learn","optional":false},{"reason":"independence testing (optional for some functions)","package":"hyppo","optional":true},{"reason":"optimal transport (optional)","package":"POT","optional":true}],"imports":[{"note":"Standard import path for spectral embedding.","symbol":"AdjacencySpectralEmbed","correct":"from graspologic.embed import AdjacencySpectralEmbed"},{"note":"Standard import path for Laplacian spectral embedding.","symbol":"LaplacianSpectralEmbed","correct":"from graspologic.embed import LaplacianSpectralEmbed"},{"note":"Standard import path for Gaussian clustering.","symbol":"GaussianCluster","correct":"from graspologic.cluster import GaussianCluster"},{"note":"Top-level import does not expose most functions; you must import submodules.","wrong":"import graspologic","symbol":"graspologic"}],"quickstart":{"code":"import numpy as np\nfrom graspologic.embed import AdjacencySpectralEmbed\nfrom graspologic.simulations import er_np\n\n# Generate a random graph\nadj = er_np(100, 0.3)\n\n# Embed the adjacency matrix\nase = AdjacencySpectralEmbed(n_components=2)\nX = ase.fit_transform(adj)\nprint(X.shape)  # (100, 2)\n","lang":"python","description":"Quickstart: generate an Erdős–Rényi graph and compute an adjacency spectral embedding."},"warnings":[{"fix":"Check return types: use .fit_transform() method on embedding classes, not standalone functions.","message":"In 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.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Replace with matplotlib.pyplot.imshow() or seaborn.heatmap().","message":"The function 'graspologic.plot.heatmap' is deprecated and will be removed in a future release. Use matplotlib directly instead.","severity":"deprecated","affected_versions":">=3.3.0"},{"fix":"Use from graspologic.embed import ... or import graspologic.embed as ge","message":"Importing 'graspologic' alone (without submodules) does not import embedding or clustering functions. You must import specific submodules like 'graspologic.embed'.","severity":"gotcha","affected_versions":"all"},{"fix":"Install with 'pip install graspologic[stats]' to include hyppo.","message":"The 'hyppo' library is an optional dependency; if not installed, some independence test functions will raise ImportError at runtime.","severity":"gotcha","affected_versions":">=3.4.0"},{"fix":"Use Python 3.9–3.12.","message":"Python 3.13 support is not yet available; graspologic requires Python <3.13.","severity":"breaking","affected_versions":">=3.4.0"}],"env_vars":null,"search_vec":"'3.13':29 '3.4.4':24 '3.9':27 'analysi':45 'cadenc':31 'communiti':46 'current':21 'detect':47 'embed':20,43 'estim':11 'graph':8,15,16,40 'graspolog':1,2 'includ':10 'irregular':33 'latent':13 'librari':6 'match':17 'minor':36 'network':44 'per':38 'posit':14 'python':5,26 'releas':30,37 'sever':35 'spectral':19,42 'statist':9,41 'support':25 'version':22 'year':39","created_at":"2026-04-27T16:59:41.560426+00:00","updated_at":"2026-04-27T16:59:41.560426+00:00","problems":{"verify_error":"import timed out after 15s"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.4.4","cli_name":"","cli_version":null,"type":"library","homepage":"https://microsoft.github.io/graspologic","github":"https://github.com/graspologic-org/graspologic","docs":null,"changelog":null,"pypi":"https://pypi.org/project/graspologic/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"timeout","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}