Graspologic-native is a Python native companion module providing high-performance C++ implementations for core algorithms used by the `graspologic` library, such as graph matching, partitioning, and clustering. It offers accelerated computation for graph-theoretic operations. The current version is 1.2.5, and its release cadence generally aligns with major updates to the `graspologic` library.
pip install graspologic-nativeVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to directly use the `leiden` community detection algorithm from `graspologic_native.partition`. It creates a simple adjacency matrix and applies the algorithm to find community assignments for the nodes. Note that `graspologic-native` functions often expect NumPy arrays as input.
Prefer `import graspologic` and use its provided functions unless you have specific performance tuning or low-level integration needs.
Ensure your Python environment matches the `requires_python` range specified on PyPI (e.g., Python 3.8-3.13 for version 1.2.5). Consider using a virtual environment.
Check PyPI for available wheels (`https://pypi.org/project/graspologic-native/#files`). If no wheel is available for your environment, ensure you have a C++ compiler installed and configured, along with Python development headers (e.g., `python3-dev` on Debian/Ubuntu).