Skip to main content

A Lean Persistent Homology Library for Python

Project description

DOI PyPI version Downloads Conda Version Conda Downloads

Build Status Build status codecov License: MIT

Ripser.py

Ripser.py is a lean persistent homology package for Python. Building on the blazing fast C++ Ripser package as the core computational engine, Ripser.py provides an intuitive interface for

  • computing persistence cohomology of sparse and dense data sets,
  • visualizing persistence diagrams,
  • computing lowerstar filtrations on images, and
  • computing representative cochains.

Additionally, through extensive testing and continuous integration, Ripser.py is easy to install on Mac, Linux, and Windows platforms.

To aid your use of the package, we've put together a large set of notebooks that demonstrate many of the features available. Complete documentation about the package can be found at ripser.scikit-tda.org.

Related Projects

If you're looking for the original C++ library, you can find it at Ripser/ripser.

If you're looking for a GPU-accelerated version of Ripser, you can find it at Ripser++

Setup

Ripser.py is available on all major platforms. All that is required is that you install the standard Python numerical computing libraries and Cython.

Dependencies:

  • Cython
  • numpy
  • scipy
  • scikit-learn
  • persim

Windows users: If you are using a Windows machine, you will also need to install MinGW on your system.

Mac users: Updating your Xcode and Xcode command line tools will probably fix any issues you have with installation.

Cython should be the only library required before installation. To install, type the following commands into your environment:

pip install cython
pip install ripser

If you are having trouble installing, please let us know!

Usage

The interface is as simple as can be:

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)

We also supply a Scikit-learn transformer style object if you would prefer to use that:

import numpy as np
from ripser import Rips

rips = Rips()
data = np.random.random((100,2))
diagrams = rips.fit_transform(data)
rips.plot(diagrams)
Ripser.py output persistence diagram

Contributions

We welcome all kinds of contributions! Please get in touch if you would like to help out. Everything from code to notebooks to examples and documentation are all equally valuable so please don't feel you can't contribute. To contribute please fork the project make your changes and submit a pull request. We will do our best to work through any issues with you and get your code merged into the main branch.

If you found a bug, have questions, or are just having trouble with the library, please open an issue in our issue tracker and we'll try to help resolve the concern.

License

Ripser.py is available under an MIT license! The core C++ code is derived from Ripser, which is also available under an MIT license and copyright to Ulrich Bauer. The modifications, Python code, and documentation is copyright to Christopher Tralie and Nathaniel Saul.

Citing

If you use this package, please site the JoSS paper found here: DOI

You can use the following bibtex entry

@article{ctralie2018ripser,
  doi = {10.21105/joss.00925},
  url = {https://doi.org/10.21105/joss.00925},
  year  = {2018},
  month = {Sep},
  publisher = {The Open Journal},
  volume = {3},
  number = {29},
  pages = {925},
  author = {Christopher Tralie and Nathaniel Saul and Rann Bar-On},
  title = {{Ripser.py}: A Lean Persistent Homology Library for Python},
  journal = {The Journal of Open Source Software}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ripser-0.5.3.tar.gz (80.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ripser-0.5.3-py3.7-win-amd64.egg (68.1 kB view details)

Uploaded Egg

ripser-0.5.3-py3.7-win32.egg (62.4 kB view details)

Uploaded Egg

ripser-0.5.3-py3.6-win-amd64.egg (68.1 kB view details)

Uploaded Egg

ripser-0.5.3-py3.6-win32.egg (62.4 kB view details)

Uploaded Egg

ripser-0.5.3-cp37-cp37m-win_amd64.whl (59.6 kB view details)

Uploaded CPython 3.7mWindows x86-64

ripser-0.5.3-cp37-cp37m-win32.whl (53.8 kB view details)

Uploaded CPython 3.7mWindows x86

ripser-0.5.3-cp36-cp36m-win_amd64.whl (59.5 kB view details)

Uploaded CPython 3.6mWindows x86-64

ripser-0.5.3-cp36-cp36m-win32.whl (53.8 kB view details)

Uploaded CPython 3.6mWindows x86

File details

Details for the file ripser-0.5.3.tar.gz.

File metadata

  • Download URL: ripser-0.5.3.tar.gz
  • Upload date:
  • Size: 80.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3.tar.gz
Algorithm Hash digest
SHA256 cb63a03205511cd3d2aae586cec9515dddfbec3ce269dd0560911b0a55d75632
MD5 d040c8189520ccd90589335a188a16fd
BLAKE2b-256 2cb0a130e5e1d2f516d5d27be09fe8a0023c0684961c8767ad10ff6a64596918

See more details on using hashes here.

File details

Details for the file ripser-0.5.3-py3.7-win-amd64.egg.

File metadata

  • Download URL: ripser-0.5.3-py3.7-win-amd64.egg
  • Upload date:
  • Size: 68.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3-py3.7-win-amd64.egg
Algorithm Hash digest
SHA256 1230349850ee908b0e461159da96c565d2944e1af695168761b2823e59f45e15
MD5 1b28c90a1b85148bec43aaaf913e56be
BLAKE2b-256 fc1bfdfe48ae0409f385516a02831f20dc40bcf2c889d1c4a8ed65842279f24e

See more details on using hashes here.

File details

Details for the file ripser-0.5.3-py3.7-win32.egg.

File metadata

  • Download URL: ripser-0.5.3-py3.7-win32.egg
  • Upload date:
  • Size: 62.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3-py3.7-win32.egg
Algorithm Hash digest
SHA256 6af13b0fa85421b5620a2d08a04d12bf1177bee7721d1eda66dd790512582cba
MD5 c59b982ed3294a6c2939ae1b3296e4d6
BLAKE2b-256 24ee4f18cc582cfa2d1744a22e03381a80847b33de675cb3384c455cada79217

See more details on using hashes here.

File details

Details for the file ripser-0.5.3-py3.6-win-amd64.egg.

File metadata

  • Download URL: ripser-0.5.3-py3.6-win-amd64.egg
  • Upload date:
  • Size: 68.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3-py3.6-win-amd64.egg
Algorithm Hash digest
SHA256 6d854f2b4a437d600d1343b6eafab760172c05748d261962435edb7c67b1a28c
MD5 c138de2dda1fb13c399d399bf4788a09
BLAKE2b-256 4a93b47ffe8b72285278f7d70c37466c7204e4d8fcc9c343508c1795f7226056

See more details on using hashes here.

File details

Details for the file ripser-0.5.3-py3.6-win32.egg.

File metadata

  • Download URL: ripser-0.5.3-py3.6-win32.egg
  • Upload date:
  • Size: 62.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3-py3.6-win32.egg
Algorithm Hash digest
SHA256 c1009c8a7e93bf96e9b91f0ea1985acb55262654034c1363e35464a12ef85724
MD5 4f510c12856579e7edc531aab87dd4d9
BLAKE2b-256 e690cf3ed2d83393dfe9a548cd8965a74a374eda677e8e83425771a952f70567

See more details on using hashes here.

File details

Details for the file ripser-0.5.3-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: ripser-0.5.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 59.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 aab8123956d96202de077e8821171f1854653679cd22787f8cca853ee4d1c21c
MD5 9e378f3a516919826e062675fd8b59ba
BLAKE2b-256 24f11f3830d25492a0ba7163385fb8d42a8499e0175dc6b471795169c0389c16

See more details on using hashes here.

File details

Details for the file ripser-0.5.3-cp37-cp37m-win32.whl.

File metadata

  • Download URL: ripser-0.5.3-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 606c9f137f9eadf0b6b56edcaf15ae7818580975803c81da775273b4cf292715
MD5 d04511e8b6635a846c1932a07cf68bb1
BLAKE2b-256 f5f02592f8206cbdbe7d2cc987fe0a1d2cc80d3dbad0675a7040e1a4b00e6e77

See more details on using hashes here.

File details

Details for the file ripser-0.5.3-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: ripser-0.5.3-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 59.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 33999f6c70a6a4589ac396da0bad84d71c6e6e71f54c257bd7cd839fbb8c6ed5
MD5 5b207d5309dad1b97821d427cf762690
BLAKE2b-256 14ff9fef2cf2d4b48abd7f52e15dff4d4a118f83ff75c052409b2f400bad0eb1

See more details on using hashes here.

File details

Details for the file ripser-0.5.3-cp36-cp36m-win32.whl.

File metadata

  • Download URL: ripser-0.5.3-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for ripser-0.5.3-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 33ae068620ab89c4f1aea7d8c12b0d856bf0383c5c4a312820e99541eb1a4168
MD5 30b18a3d8f27f8cad87869639e7d094d
BLAKE2b-256 95e40272cf4f05d8375c980b63655c16251595ed163c4a641badd67f8240a6e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page