summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGard Spreemann <gard.spreemann@epfl.ch>2016-09-06 11:18:37 +0200
committerGard Spreemann <gard.spreemann@epfl.ch>2016-09-06 11:18:37 +0200
commita794fbe32d1b2af539f0cec398efec7a29192908 (patch)
tree2a14177689d33415a6728514698960eaa13ac425
parented21e00112cbed91a2db6b8225ce6fef24648cef (diff)
No longer compensate for DIPHA dividing weights by 2.v0.0.6
Version 0.0.6.
-rw-r--r--README.md4
-rw-r--r--phstuff/diphawrapper.py33
-rw-r--r--setup.py2
3 files changed, 21 insertions, 18 deletions
diff --git a/README.md b/README.md
index b98470c..1e67fcf 100644
--- a/README.md
+++ b/README.md
@@ -35,8 +35,8 @@ following caveats:
Installation
-----
-Version 0.0.4 is available
-[here](https://nonempty.org/software/python-phstuff/phstuff-0.0.4.tar.gz). The
+Version 0.0.6 is available
+[here](https://nonempty.org/software/python-phstuff/phstuff-0.0.6.tar.gz). The
package can be installed using standard Python tools, for example by
doing `python setup.py install --user` or something similar.
diff --git a/phstuff/diphawrapper.py b/phstuff/diphawrapper.py
index 4d1742e..1b633b5 100644
--- a/phstuff/diphawrapper.py
+++ b/phstuff/diphawrapper.py
@@ -29,10 +29,11 @@ def save_weight_matrix(fname, weights):
"""Write a NumPy weight matrix to a DIPHA full distance matrix
file. Corresponds to DIPHA's "distance matrix data".
- Attention: DIPHA uses a convention wherein an edge's
- filtration value is *half* its weight. This function compensates
- by multiplying every weight by 2. Pay attention in case DIPHA's
- behavior changes in the future!
+ Attention: DIPHA currently uses a convention wherein an edge's
+ filtration value is *half* its weight. Prior to version 0.0.6 of
+ this package, we would compensate for this by multiplying every
+ weight by 2. As of version 0.0.6, we no longer do so. Pay
+ attention in case DIPHA's behavior changes in the future!
Parameters:
-----------
@@ -50,7 +51,7 @@ def save_weight_matrix(fname, weights):
# we compensate by multiplying all entries by 2. Be sure to pay
# attention if DIPHA's behavior changes!
- factor = 2.0
+ factor = 1.0
m = weights.shape[0]
if weights.shape[0] != weights.shape[1]:
@@ -73,10 +74,11 @@ def save_masked_weight_matrix(fname, weights):
matrix file, keeping edges only for unmasked entries. Corresponds
to DIPHA's "sparse distance matrix data".
- Attention: DIPHA uses a convention wherein an edge's filtration
- value is *half* its weight. This function compensates by
- multiplying every weight by 2. Pay attention in case DIPHA's
- behavior changes in the future!
+ Attention: DIPHA currently uses a convention wherein an edge's
+ filtration value is *half* its weight. Prior to version 0.0.6 of
+ this package, we would compensate for this by multiplying every
+ weight by 2. As of version 0.0.6, we no longer do so. Pay
+ attention in case DIPHA's behavior changes in the future!
Parameters:
-----------
@@ -89,7 +91,7 @@ def save_masked_weight_matrix(fname, weights):
"""
- factor = 2.0
+ factor = 1.0
n = weights.shape[1]
@@ -114,10 +116,11 @@ def save_edge_list(fname, edge_list):
list to a DIPHA sparse distance file. Corresponds
to DIPHA's "sparse distance matrix data".
- Attention: DIPHA uses a convention wherein an edge's filtration
- value is *half* its weight. This function compensates by
- multiplying every weight by 2. Pay attention in case DIPHA's
- behavior changes in the future!
+ Attention: DIPHA currently uses a convention wherein an edge's
+ filtration value is *half* its weight. Prior to version 0.0.6 of
+ this package, we would compensate for this by multiplying every
+ weight by 2. As of version 0.0.6, we no longer do so. Pay
+ attention in case DIPHA's behavior changes in the future!
Parameters:
-----------
@@ -139,7 +142,7 @@ def save_edge_list(fname, edge_list):
"""
- factor = 2.0
+ factor = 1.0
n = len(edge_list)
diff --git a/setup.py b/setup.py
index ffa2007..4dc3ed7 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup
setup(name="phstuff",
- version="0.0.4", # Remember to update version and download
+ version="0.0.6", # Remember to update version and download
# information in README.md too!
description="Some persistent homology glue",
url="https://nonempty.org/software/python-phstuff",