Skip to content

Commit 7611cfe

Browse files
committed
Ensure int casts in condensed tree #600
1 parent dd27600 commit 7611cfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hdbscan/_hdbscan_tree.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ cpdef np.ndarray condense_tree(np.ndarray[np.double_t, ndim=2] hierarchy,
106106
lambda_value = INFTY
107107

108108
if left >= num_points:
109-
left_count = <np.intp_t> hierarchy[left - num_points][3]
109+
left_count = <np.intp_t> int(hierarchy[left - num_points][3])
110110
else:
111111
left_count = 1
112112

113113
if right >= num_points:
114-
right_count = <np.intp_t> hierarchy[right - num_points][3]
114+
right_count = <np.intp_t> int(hierarchy[right - num_points][3])
115115
else:
116116
right_count = 1
117117

0 commit comments

Comments
 (0)