10000 BUG: fix KD Tree node construction (fixes #11313) · scikit-learn/scikit-learn@2c2b6c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c2b6c3

Browse files
jakevdpagramfort
authored andcommitted
BUG: fix KD Tree node construction (fixes #11313)
1 parent bf11d44 commit 2c2b6c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sklearn/neighbors/kd_tree.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ cdef int init_node(BinaryTree tree, ITYPE_t i_node,
6969
for j in range(n_features):
7070
lower_bounds[j] = fmin(lower_bounds[j], data_row[j])
7171
upper_bounds[j] = fmax(upper_bounds[j], data_row[j])
72+
73+
for j in range(n_features):
7274
if tree.dist_metric.p == INF:
7375
rad = fmax(rad, 0.5 * (upper_bounds[j] - lower_bounds[j]))
7476
else:

0 commit comments

Comments
 (0)
0