Skip to content

Commit

Permalink
Ensure int casts in condensed tree scikit-learn-contrib#600
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcinnes authored and stevenfisher-htc committed Aug 31, 2023
1 parent 70bc4d5 commit f1833db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hdbscan/_hdbscan_tree.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ cpdef np.ndarray condense_tree(np.ndarray[np.double_t, ndim=2] hierarchy,
lambda_value = INFTY

if left >= num_points:
left_count = <np.intp_t> hierarchy[left - num_points][3]
left_count = <np.intp_t> int(hierarchy[left - num_points][3])
else:
left_count = 1

if right >= num_points:
right_count = <np.intp_t> hierarchy[right - num_points][3]
right_count = <np.intp_t> int(hierarchy[right - num_points][3])
else:
right_count = 1

Expand Down

0 comments on commit f1833db

Please sign in to comment.