ripser
A Lean Persistent Homology Library for Python
What it is and what it does
Ripser.py is a Python wrapper around the fast C++ Ripser library for computing persistent homology, a technique from algebraic topology that tracks how topological features (connected components, holes, voids) persist across different scales in data. It takes point clouds or distance matrices as input and outputs persistence diagrams—visualizations showing which features appear and disappear as you vary a scale parameter. The package provides both a functional interface (ripser function) and a scikit-learn compatible transformer (Rips class) for integration into machine learning pipelines.
The package depends on Cython, numpy, scipy, scikit-learn, and persim for visualization. It compiles to native code, giving it speed advantages over pure-Python implementations. Installation is straightforward on major platforms through precompiled wheels, though Windows users may need MinGW and macOS users should have current Xcode tools. The library is actively maintained and carries no known security vulnerabilities.
Use it for:
- Analyze the topological structure of high-dimensional datasets to discover clusters, holes, or voids without specifying cluster count in advance.
- Visualize persistence diagrams to understand which topological features are robust (signal) versus noise in your data.
- Compute lowerstar filtrations on image data to extract topological features for computer vision tasks.
- Extract representative cochains to identify which data points or features drive topological structure.
- Use as a scikit-learn transformer in unsupervised learning pipelines for topological feature engineering.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Ripser computes persistent homology and persistence diagrams for point clouds and sparse/dense datasets, enabling topological data analysis through an interface wrapping the fast C++ Ripser engine.
Yes. Ripser is a specialized but well-maintained tool for topological data analysis with no security issues, permissive licensing, and broad platform support. Install friction is moderate (compilation required) but manageable via wheels. Suitable if you need persistent homology or topological feature extraction; not necessary for standard clustering or dimensionality reduction.
Install
ripser on PyPI
pip
pip install ripseruv
uv add ripserpoetry
poetry add ripserInstalling ripser
Before you install
Medium install friction due to Cython compilation and compiled dependencies (numpy, scipy, scikit-learn). Wheels available across macOS, Linux, and Windows platforms. Active maintenance with recent release and continuous integration support.
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions. Derived from the original Ripser C++ library (also MIT), with modifications and Python code copyright to Christopher Tralie and Nathaniel Saul.
Quickstart
pip install ripser
import numpy as np
from ripser import ripser
from persim import plot_diagrams
data = np.random.random((100, 2))
diagrams = ripser(data)['dgms']
plot_diagrams(diagrams, show=True)
Windows users may need MinGW installed; macOS users should update Xcode and command line tools. Compilation from source requires Cython.
Verify before relying
- Whether the optional robin_hood hash table integration (claimed to provide up to 30% speedup) is available in precompiled wheels or only when building from source.
- Specific minimum Python version requirements (requires_python is unspecified in metadata).
- Performance characteristics and scalability limits for large point clouds.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 5 — Cython, numpy, persim, scipy, scikit-learn |
| Maintenance | actively maintained — 79 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 81,680/month — #14,208 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ripser-0.6.15-cp310-cp310-macosx_10_9_x86_64.whl; ripser-0.6.15-cp310-cp310-macosx_11_0_arm64.whl; ripser-0.6.15-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ripser-0.6.15-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; ripser-0.6.15-cp310-cp310-musllinux_1_2_aarch64.whl; ripser-0.6.15-cp310-cp310-musllinux_1_2_x86_64.whl; ripser-0.6.15-cp310-cp310-win32.whl; ripser-0.6.15-cp310-cp310-win_amd64.whl; ripser-0.6.15-cp311-cp311-macosx_10_9_x86_64.whl; ripser-0.6.15-cp311-cp311-macosx_11_0_arm64.whl; ripser-0.6.15-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ripser-0.6.15-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; ripser-0.6.15-cp311-cp311-musllinux_1_2_aarch64.whl; ripser-0.6.15-cp311-cp311-musllinux_1_2_x86_64.whl; ripser-0.6.15-cp311-cp311-win32.whl; ripser-0.6.15-cp311-cp311-win_amd64.whl; ripser-0.6.15-cp312-cp312-macosx_10_13_x86_64.whl; ripser-0.6.15-cp312-cp312-macosx_11_0_arm64.whl; ripser-0.6.15-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ripser-0.6.15-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Keywords: topological data analysis, persistent homology, Rips filtration, algebraic topology, unsupervised learning, persistence diagrams
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
spaghettiSpaghetti analyzes network-based spatial data…
permissive · top 15,000 on PyPI
umap-learnUMAP reduces high-dimensional data to lower…
permissive · top 5,000 on PyPI
mordredcommunityCalculates molecular descriptors from chemical…
permissive · top 15,000 on PyPI
PersistenceProvides a persistent base class built on…
unclear · top 15,000 on PyPI
persistentProvides transparent persistence for Python…
unclear · top 15,000 on PyPI
cornerGenerates publication-quality corner plots…
permissive · top 15,000 on PyPI
dwave-graphsProvides graph representations and algorithms…
permissive · top 15,000 on PyPI
scikit-networkscikit-network provides graph algorithms and…
permissive · top 5,000 on PyPI