Skip to content

Commit 9acb495

Browse files
committed
isin returns the vertices shape, so the reshape is incorrect now
1 parent c3f3d85 commit 9acb495

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hdbscan/validity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def internal_minimum_spanning_tree(mr_distances):
180180
# A little "fancy" we select from the flattened array reshape back
181181
# (Fortran format to get indexing right) and take the product to do an and
182182
# then convert back to boolean type.
183-
edge_selection = np.prod(np.isin(min_span_tree.T[:2], vertices).reshape(
184-
(min_span_tree.shape[0], 2), order='F'), axis=1).astype(bool)
183+
edge_selection = np.prod(
184+
np.isin(min_span_tree.T[:2], vertices), axis=0).astype(bool)
185185

186186
# Density sparseness is not well defined if there are no
187187
# internal edges (as per the referenced paper). However

0 commit comments

Comments
 (0)