Registry / ai-ml / ripser

ripser

JSON →
library0.6.15pypypi✓ verified 86d ago

Ripser.py is a lean persistent homology library for Python, computing Vietoris–Rips persistence barcodes. Current version is 0.6.15, with maintenance-level updates.

pip install ripser
INSTALL
IMPORT
SIG · RIPSER
R
ripser
ai-mlpythonv0.6.15
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

ripser
from ripser import ripser
Rips
from ripser import Rips
plot_diagrams
from ripser import plot_diagrams
Previously from persim, now in ripser itself

Compute and plot Vietoris–Rips persistence diagrams from a random point cloud.

import numpy as np from ripser import ripser from persim import plot_diagrams # Generate random point cloud data = np.random.random((100, 2)) # Compute persistence diagrams diagrams = ripser(data)['dgms'] # Plot plot_diagrams(diagrams, show=True)
Debug
Known issues
gotchaThe ripser function returns a dictionary, not a tuple. Access diagrams via ['dgms'].
fix
Use `diagrams = ripser(data)['dgms']` instead of a bare unpacking.
affects: all
breakingIn version 0.6, the plot_diagrams function was moved from persim to ripser. Importing from persim still works but is deprecated.
fix
Use `from ripser import plot_diagrams` or install persim separately.
affects: >=0.6
gotchaRipser may fail silently with large point clouds due to memory limits. The default `maxdim` parameter is 1, which restricts computation.
fix
Set `maxdim=2` or higher explicitly if you need higher-dimensional features.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'ripser'
Package not installed or installed in a different environment.
fix
Run `pip install ripser`.
AttributeError: module 'ripser' has no attribute 'plot_diagrams'
Attempting to import plot_diagrams from ripser < 0.6, or using a version where it was moved.
fix
Update ripser (`pip install --upgrade ripser`) or install persim (`pip install persim`) and import from there.
ValueError: distance matrix must be a square matrix
Input is not a valid distance matrix; ripser with `distance_matrix=True` expects a 2D array where rows = columns.
fix
Ensure the input matrix is square and symmetric. For point clouds, omit `distance_matrix=True`.
Upgrade
Version history
0.6.15latest on PyPI · released May 27, 2026
Audit
Dependencies
numpyrequiredRequired for array operations
scipyrequiredUsed for distance matrix computations
persimoptionalOptional, for persistence diagram comparison
Agent activity
7 hits · last 30 days
node
6
Resources
ripser — pip install ripser · libregistry