Skip to content

Commit 064deb5

Browse files
committed
Final fixes for initial boruvka implementation version.
1 parent f6de4fb commit 064deb5

File tree

6 files changed

+1010
-2321
lines changed

6 files changed

+1010
-2321
lines changed

hdbscan/_hdbscan_boruvka.c

Lines changed: 239 additions & 310 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hdbscan/_hdbscan_boruvka.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ cdef class BallTreeBoruvkaAlgorithm (object):
646646
self.component_union_find.union_(source, sink)
647647
self.candidate_distance[component] = DBL_MAX
648648
if self.num_edges == self.num_points - 1:
649-
self.components = np.unique(self.component_union_find.components())
649+
self.components = self.component_union_find.components()
650650
return self.components.shape[0]
651651

652652
for n in range(self.tree.data.shape[0]):
@@ -669,7 +669,7 @@ cdef class BallTreeBoruvkaAlgorithm (object):
669669
self.component_of_node[n] = self.component_of_node[child1]
670670

671671
last_num_components = self.components.shape[0]
672-
self.components = np.unique(self.component_union_find.components())
672+
self.components = self.component_union_find.components()
673673

674674
if self.components.shape[0] == last_num_components:
675675
# Reset bounds

0 commit comments

Comments
 (0)