Skip to content

Commit c3f3d85

Browse files
committed
Avoid cython error (but there should be a better way)
1 parent 2e10d38 commit c3f3d85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hdbscan/_hdbscan_tree.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,10 @@ cpdef tuple get_clusters(np.ndarray tree, dict stability,
725725
# if you do, change this accordingly!
726726
if allow_single_cluster:
727727
node_list = sorted(stability.keys(), reverse=True)
728+
node_list = [int(n) for n in node_list]
728729
else:
729730
node_list = sorted(stability.keys(), reverse=True)[:-1]
731+
node_list = [int(n) for n in node_list]
730732
# (exclude root)
731733

732734
cluster_tree = tree[tree['child_size'] > 1]

0 commit comments

Comments
 (0)