Skip to main content

A Lean Persistent Homology Library for Python

Project description

DOI PyPI version 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.

If you're looking for the original C++ library, you can find it at Ripser/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
  • matplotlib
  • scikit-learn

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

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, plot_dgms

data = np.random.random((100,2))
diagrams = ripser(data)['dgms']
plot_dgms(diagrams)

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.3.2.tar.gz (73.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.3.2-py3.7-win-amd64.egg (66.8 kB view details)

Uploaded Egg

ripser-0.3.2-py3.7-win32.egg (72.0 kB view details)

Uploaded Egg

ripser-0.3.2-py3.6-win-amd64.egg (66.8 kB view details)

Uploaded Egg

ripser-0.3.2-py3.6-win32.egg (71.9 kB view details)

Uploaded Egg

ripser-0.3.2-py3.5-win-amd64.egg (66.3 kB view details)

Uploaded Egg

ripser-0.3.2-py3.5-win32.egg (71.4 kB view details)

Uploaded Egg

ripser-0.3.2-cp37-cp37m-macosx_10_14_x86_64.whl (65.8 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

ripser-0.3.2-cp37-cp37m-macosx_10_9_x86_64.whl (67.3 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

ripser-0.3.2-cp36-cp36m-win_amd64.whl (59.1 kB view details)

Uploaded CPython 3.6mWindows x86-64

File details

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

File metadata

  • Download URL: ripser-0.3.2.tar.gz
  • Upload date:
  • Size: 73.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2.tar.gz
Algorithm Hash digest
SHA256 ff9f50fba911f0e9212077b78014f83e30c97526194dd6bd1df3d81896e6cb58
MD5 718c1e3abb12cafd10d3f841219e85da
BLAKE2b-256 8c52ca457da871708a169a0042d955f31f55caa060d1846f3de72b538724ef50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ripser-0.3.2-py3.7-win-amd64.egg
  • Upload date:
  • Size: 66.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2-py3.7-win-amd64.egg
Algorithm Hash digest
SHA256 6be4ffdbaeebd82adb3d9b140fcdeaeb3eaee91df1c056cd5a3d0bffce9fd9eb
MD5 b969cca409960aaa5626c20699958f95
BLAKE2b-256 19373200df57344a6ec642b34d402e350d517ef83a6c39978d8d8e53980e3924

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ripser-0.3.2-py3.7-win32.egg
  • Upload date:
  • Size: 72.0 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2-py3.7-win32.egg
Algorithm Hash digest
SHA256 e1ee6ccb3e6cf3e737cfaf7e4d68719683c4f156b08174900661d42f40c79313
MD5 4d46c0b8deb59aff535ad6f060a481ac
BLAKE2b-256 70d014aecb6f84f9c9a6687865a8222f1582c09a1d41ce2accc132fb3091968d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ripser-0.3.2-py3.6-win-amd64.egg
  • Upload date:
  • Size: 66.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2-py3.6-win-amd64.egg
Algorithm Hash digest
SHA256 d19780352bb3a87455b3ea4e6ebc0f4e4c37c947c031b2fbefb15922796f6c12
MD5 9a6bdd4f67f01ad718359c75fa7aaeff
BLAKE2b-256 e9d760d935b5ce824adb4a8aa3c3042f0eae37fbdcab5d25ff623a27e8cd59f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ripser-0.3.2-py3.6-win32.egg
  • Upload date:
  • Size: 71.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2-py3.6-win32.egg
Algorithm Hash digest
SHA256 b61a909272dd59b04581cae42f0fdea25728932510ec34689e94e33ea7beeaef
MD5 16237ad96c9ef3604f420af7f9dd3e54
BLAKE2b-256 ba6f20e77913a3445b36c84befdc9e36b695c1e9c82386357f18e0552627cdd2

See more details on using hashes here.

File details

Details for the file ripser-0.3.2-py3.5-win-amd64.egg.

File metadata

  • Download URL: ripser-0.3.2-py3.5-win-amd64.egg
  • Upload date:
  • Size: 66.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2-py3.5-win-amd64.egg
Algorithm Hash digest
SHA256 47622868b40590e71b2703a3c027acb18d549c39212f5d5978ed9ae029a95061
MD5 35ab51a6d8de31d567d721773c0bd53d
BLAKE2b-256 b642761fd2c8fc4d129e717e335f97b113b05aeadf1e6683a507451e8d947765

See more details on using hashes here.

File details

Details for the file ripser-0.3.2-py3.5-win32.egg.

File metadata

  • Download URL: ripser-0.3.2-py3.5-win32.egg
  • Upload date:
  • Size: 71.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2-py3.5-win32.egg
Algorithm Hash digest
SHA256 de8d4c368564aaf667adfbf28000a137217e91e215775fa9cd70698bdc5891b1
MD5 971d5a8bab1cfaf310a340dcde02f28f
BLAKE2b-256 660a05413e8700801c1aeb35290b1e3c697e5286f401507354629f2493b8c0e2

See more details on using hashes here.

File details

Details for the file ripser-0.3.2-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: ripser-0.3.2-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 65.8 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for ripser-0.3.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 0e060fb2b2d089e4c2c42b5bb8ecc8fd6507535235b30f57204f1a4fba19c1bd
MD5 3e09a220e7de14a6c9346e55a8655c59
BLAKE2b-256 17fd06991a43726e72d41cae8b99f8e6493aff487a553340f73375e2fa89a4fe

See more details on using hashes here.

File details

Details for the file ripser-0.3.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: ripser-0.3.2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 67.3 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 671b1885cae403fead3ba60fb1e273522df9036a8b7fa4c9fcb3e845e7ba7310
MD5 c61cad525c64332a39fa35780b367750
BLAKE2b-256 307b9ecb85c73690a1aca5a6a7c93fa645bf2d34eeb726343f7e3b6358aeb72c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ripser-0.3.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 59.1 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ripser-0.3.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 badb7f7a29c0ca7669e50d43f0547e62ef3f9b5518990992b23f953cece23bc6
MD5 299443ba42a8751409037fade816cd89
BLAKE2b-256 f4d2c61631035a01db0d436490310868ece0482cdef9f540a3e2a0d470203f37

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