Skip to content

Commit

Permalink
Further debugging failure on travis that is unreproducible locally.
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcinnes committed Aug 19, 2016
1 parent e65c177 commit f45b4c3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hdbscan/hdbscan_.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,11 @@ def _hdbscan_boruvka_kdtree(X, min_samples=5, alpha=1.0,
approx_min_span_tree=approx_min_span_tree, n_jobs=core_dist_n_jobs, **kwargs)
min_spanning_tree = alg.spanning_tree()
# Sort edges of the min_spanning_tree by weight
if min_spanning_tree.shape[1] < 3:
print(min_spanning_tree)
row_order = np.argsort(min_spanning_tree.T[2])
if row_order.shape[0] <= 1:
print(row_order)
min_spanning_tree = min_spanning_tree[row_order, :]
try:
min_spanning_tree = min_spanning_tree[row_order, :]
except IndexError:
raise Exception("{}".format(row_order))
# Convert edge list into standard hierarchical clustering format
single_linkage_tree = label(min_spanning_tree)

Expand Down

0 comments on commit f45b4c3

Please sign in to comment.