Skip to content

Commit 8dba5a0

Browse files
committed
More numpy 1.6 support changes.
1 parent 927f86c commit 8dba5a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hdbscan/validity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from sklearn.metrics import pairwise_distances
33
from scipy.spatial.distance import cdist
44
from ._hdbscan_linkage import mst_linkage_core
5+
from .hdbscan_ import isclose
56

67
def all_points_core_distance(distance_matrix, d=2.0):
78
"""
@@ -144,7 +145,7 @@ def internal_minimum_spanning_tree(mr_distances):
144145
single_linkage_data = mst_linkage_core(mr_distances)
145146
min_span_tree = single_linkage_data.copy()
146147
for index, row in enumerate(min_span_tree[1:], 1):
147-
candidates = np.where(np.isclose(mr_distances[int(row[1])], row[2]))[0]
148+
candidates = np.where(isclose(mr_distances[int(row[1])], row[2]))[0]
148149
candidates = np.intersect1d(candidates,
149150
single_linkage_data[:index, :2].astype(
150151
int))

0 commit comments

Comments
 (0)