summaryrefslogtreecommitdiff
path: root/src/python/gudhi
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/gudhi')
-rw-r--r--src/python/gudhi/weighted_rips_complex.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/gudhi/weighted_rips_complex.py b/src/python/gudhi/weighted_rips_complex.py
index 9df2ddf9..7e504b2c 100644
--- a/src/python/gudhi/weighted_rips_complex.py
+++ b/src/python/gudhi/weighted_rips_complex.py
@@ -51,7 +51,7 @@ class WeightedRipsComplex:
st.insert([i], F[i])
for i in range(num_pts):
for j in range(i):
- value = (dist[i][j] + F[i] + F[j]) / 2
+ value = max(F[i], F[j], (dist[i][j] + F[i] + F[j]) / 2)
if value < self.max_filtration:
st.insert([i,j], filtration=value)