Skip to content

Commit 2231713

Browse files
lmcinneschaturv3di
andauthored
For python2 compatibility.
Co-Authored-By: chaturv3di <[email protected]>
1 parent 9a422d0 commit 2231713

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hdbscan/hdbscan_.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,9 @@ def relative_validity_(self):
996996
return
997997

998998
labels = self.labels_
999-
noise_size, *cluster_size = np.bincount(labels + 1)
999+
sizes = np.bincount(labels + 1)
1000+
noise_size = sizes[0]
1001+
cluster_size = sizes[1:]
10001002
total = noise_size + np.sum(cluster_size)
10011003
num_clusters = len(cluster_size)
10021004
DSC = np.zeros(num_clusters)

0 commit comments

Comments
 (0)