From 8ba3ca48e03e379fca0a0b68a508d8357a367f52 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 5 May 2020 20:58:54 +0200 Subject: Fix type of neighbors for "radius" --- src/python/gudhi/clustering/tomato.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/python/gudhi/clustering') diff --git a/src/python/gudhi/clustering/tomato.py b/src/python/gudhi/clustering/tomato.py index 88a1a34d..1a2887bc 100644 --- a/src/python/gudhi/clustering/tomato.py +++ b/src/python/gudhi/clustering/tomato.py @@ -109,7 +109,7 @@ class Tomato: if input_type == "distance_matrix" and self.graph_type_ == "radius": X = numpy.array(X) r = self.params_["r"] - self.neighbors_ = [numpy.nonzero(l <= r) for l in X] + self.neighbors_ = [numpy.flatnonzero(l <= r) for l in X] if input_type == "distance_matrix" and self.graph_type_ == "knn": k = self.params_["k"] -- cgit v1.2.3