Skip to content

Commit e6e60f7

Browse files
authored
Merge pull request #580 from armenbod/patch-1
Update validity.py
2 parents 813636b + d01b9a5 commit e6e60f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hdbscan/validity.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ def internal_minimum_spanning_tree(mr_distances):
175175

176176
vertices = np.arange(mr_distances.shape[0])[
177177
np.bincount(min_span_tree.T[:2].flatten().astype(np.intp)) > 1]
178+
if not len(vertices):
179+
vertices = [0]
178180
# A little "fancy" we select from the flattened array reshape back
179181
# (Fortran format to get indexing right) and take the product to do an and
180182
# then convert back to boolean type.

0 commit comments

Comments
 (0)