summaryrefslogtreecommitdiff
path: root/src/python/gudhi/representations/vector_methods.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/gudhi/representations/vector_methods.py')
-rw-r--r--src/python/gudhi/representations/vector_methods.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/gudhi/representations/vector_methods.py b/src/python/gudhi/representations/vector_methods.py
index 566c24a3..aaf7ffeb 100644
--- a/src/python/gudhi/representations/vector_methods.py
+++ b/src/python/gudhi/representations/vector_methods.py
@@ -678,7 +678,7 @@ class Atol(BaseEstimator, TransformerMixin):
self.inertias = np.array([np.max(dist_centers)/2])
else:
dist_centers = pairwise.pairwise_distances(self.centers)
- np.fill_diagonal(dist_centers, np.inf)
+ dist_centers[dist_centers == 0] = np.inf
self.inertias = np.min(dist_centers, axis=0)/2
return self