graphtools 2.0.0


pip install graphtools

  Latest version

Released: Sep 04, 2025

Project Links

Meta
Author: Scott Gigante, Daniel Burkhardt, and Jay Stanley, Yale University

Classifiers

Development Status
  • 4 - Beta

Environment
  • Console

Framework
  • Jupyter

Intended Audience
  • Developers
  • Science/Research

Natural Language
  • English

Operating System
  • MacOS :: MacOS X
  • Microsoft :: Windows
  • POSIX :: Linux

Programming Language
  • Python :: 2
  • Python :: 2.7
  • Python :: 3
  • Python :: 3.5
  • Python :: 3.6

Topic
  • Scientific/Engineering :: Mathematics
Latest PyPi version Latest Conda version Github Actions Build Read the Docs Coverage Status Twitter GitHub stars Code style: black

Tools for building and manipulating graphs in Python.

Installation

graphtools is available on pip. Install by running the following in a terminal:

pip install --user graphtools

Alternatively, graphtools can be installed using Conda (most easily obtained via the Miniconda Python distribution):

conda install -c conda-forge graphtools

Or, to install the latest version from github:

pip install --user git+git://github.com/KrishnaswamyLab/graphtools.git

For improved performance with large datasets, install with numba acceleration:

pip install --user graphtools[fast]

Usage example

The graphtools.Graph class provides an all-in-one interface for k-nearest neighbors, mutual nearest neighbors, exact (pairwise distances) and landmark graphs.

Use it as follows:

from sklearn import datasets
import graphtools
digits = datasets.load_digits()
G = graphtools.Graph(digits['data'])
K = G.kernel
P = G.diff_op
G = graphtools.Graph(digits['data'], n_landmark=300)
L = G.landmark_op

Help

If you have any questions or require assistance using graphtools, please contact us at https://krishnaswamylab.org/get-help

Wheel compatibility matrix

Platform Python 3
any

Files in release