5 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
Hera-TDA
Python bindings for Hera, a library for fast calculation of bottleneck distance and Wasserstein distance on persistence diagrams.
These bindings can be used with standard Python types (lists of lists). These bindings are also compatible with BATS.
Note that Hera is also used in Dionysus 2 for bottleneck distance computation.
Installation
You first need to install boost headers for Hera
dnf install boost-devel # fedora
pip install
pip install hera-tda
This will compile binaries.
Build from source
Then, do a recursive clone for submodules
git clone --recursive git@github.com:CompTop/pyhera.git
then you can install to your Python environment
python setup.py install
Basic Example
Bottleneck Distance
After installation, the package is available under the hera_tda namespace.
import hera_tda as hera
import hera_tda.bottleneck
pX = [[1.0, 2.0], [2.0,3.0]] # diagram 1
pY = [[1.1, 2.1], [2.1, 3.1]] # diagram 2
d, inds = hera.bottleneck.BottleneckDistance(pX, pY)
# d = 0.1
d is the computed bottleneck distance
inds is a tuple containing the indices of pX and pY that were the maximum-weight matching (-1 is used to indicate a diagonal point).
Wasserstein Distance
from hera_tda.wasserstein import WassersteinDistance
pX = [[1.0, 2.0], [2.0,3.0]]
pY = [[1.1, 2.1], [2.1, 3.1]]
p = 2.0 # wasserstein-p
d = WassersteinDistance(pX, pY, p)
# d = 0.1414...
WassersteinDistance just returns the distance. There is no matching.
Additional Examples
See demo.ipynb and wasserstein.ipynb
Release files for hera-tda 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
5 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hera-tda-0.0.2.tar.gz | 413.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| hera_tda-0.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl | PyPy 3.8 | PyPy 3.8 7.3 | Linux glibc 2.24+ x86-64 | Details |
| hera_tda-0.0.2-cp310-cp310-manylinux_2_24_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.24+ x86-64 | Details |
| hera_tda-0.0.2-cp39-cp39-manylinux_2_24_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.24+ x86-64 | Details |
| hera_tda-0.0.2-cp38-cp38-manylinux_2_24_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.24+ x86-64 | Details |
| hera_tda-0.0.2-cp36-cp36m-manylinux_2_24_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.24+ x86-64 | Details |
Total release size: 11.8 MB
Release files / hera-tda-0.0.2.tar.gz
| Download URL | hera-tda-0.0.2.tar.gz |
|---|---|
| Size | 413.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eacda383a28039bcc661fa9ff37a8e6cc67fd249724af29c7af8a264d3360d08
|
|
BLAKE2b-256 checksum How to use checksums |
8b21aee1e045c140ec0d539b26825bd0d0dcb080224cb8cc4d1d626906819cf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.59.0 importlib-metadata/4.8.2 keyring/23.1.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.10
|
Release files / hera_tda-0.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | hera_tda-0.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | Linux glibc 2.24+ x86-64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
15dbf3f56923b0afef3062cef173cf8fa09eb95d82ad98d104d61709f3e50b4f
|
|
BLAKE2b-256 checksum How to use checksums |
bc3793412b3f92b73bc7bff2532a5998990aa24544c1424854032d89aec9e6c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.59.0 importlib-metadata/4.8.2 keyring/23.1.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.10
|
Release files / hera_tda-0.0.2-cp310-cp310-manylinux_2_24_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | hera_tda-0.0.2-cp310-cp310-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
b21dc4548663872aa87b0a3a24cd6a92e5a375caced4e624ab20bbabe660def4
|
|
BLAKE2b-256 checksum How to use checksums |
269bb978bde070693f27b4b449812c90dccfee44c3e5b38eb8e2fa51f9429eef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.59.0 importlib-metadata/4.8.2 keyring/23.1.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.10
|
Release files / hera_tda-0.0.2-cp39-cp39-manylinux_2_24_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | hera_tda-0.0.2-cp39-cp39-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.9 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
83faabf147159f334e61d389a9defb454c56c40e00d7274a917294c0ea554956
|
|
BLAKE2b-256 checksum How to use checksums |
e57c2763db98875b6e08b55cb1e0c7ee5b485bc13d9d464427a481e3d87ad40b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.59.0 importlib-metadata/4.8.2 keyring/23.1.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.10
|
Release files / hera_tda-0.0.2-cp38-cp38-manylinux_2_24_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | hera_tda-0.0.2-cp38-cp38-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.8 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
455da3269b6eb221a8d6d4b8b77001e8ae8b59de6be6a7085afbe6c6afe5e782
|
|
BLAKE2b-256 checksum How to use checksums |
487cb88b198bcf4bd5b6aa8c803b484c59827cb10dc962f7b1942c9f3d15e3f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.59.0 importlib-metadata/4.8.2 keyring/23.1.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.10
|
Release files / hera_tda-0.0.2-cp36-cp36m-manylinux_2_24_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | hera_tda-0.0.2-cp36-cp36m-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
4756919ccc5a222d8bf73ece744381d2e90683c97e8b11b0f8238b781b035178
|
|
BLAKE2b-256 checksum How to use checksums |
c2bce6ea269a698ce42f250a4d8d61f0079c8302051d1c04a4a2c878acc34e73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.59.0 importlib-metadata/4.8.2 keyring/23.1.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.10
|