From 1bb20075bea223734dfbd0750e3d787f00388f29 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Mon, 9 Mar 2020 15:11:14 +0100 Subject: Test explicitly if weights is None, instead of relying on conversion to Bool. --- src/python/gudhi/clustering/tomato.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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_ -- cgit v1.2.3