summaryrefslogtreecommitdiff
path: root/src/python/gudhi/clustering
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2020-03-09 15:11:14 +0100
committerMarc Glisse <marc.glisse@inria.fr>2020-03-09 15:11:14 +0100
commit1bb20075bea223734dfbd0750e3d787f00388f29 (patch)
tree7afe3a2fa6f0d143ce430fffe38b112368d64296 /src/python/gudhi/clustering
parentcb265d9262da5beb233ffdec3694d2dd15a9f2fd (diff)
Test explicitly if weights is None, instead of relying on conversion to Bool.
Diffstat (limited to 'src/python/gudhi/clustering')
-rw-r--r--src/python/gudhi/clustering/tomato.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/gudhi/clustering/tomato.py b/src/python/gudhi/clustering/tomato.py
index fd8f0e98..e3d814d1 100644
--- a/src/python/gudhi/clustering/tomato.py
+++ b/src/python/gudhi/clustering/tomato.py
@@ -89,7 +89,7 @@ class Tomato:
"""
# TODO: First detect if this is a new call with the same data (only threshold changed?)
# TODO: less code duplication (subroutines?), less spaghetti, but don't compute neighbors twice if not needed. Clear error message for missing or contradictory parameters.
- if weights:
+ if weights is not None:
density_type = "manual"
else:
density_type = self.density_type_