ENH remove redundant expr in min_max_dist
@@ -159,10 +159,8 @@ cdef inline int min_max_dist(BinaryTree tree, ITYPE_t i_node, DTYPE_t* pt,
d_hi = pt[j] - tree.node_bounds[1, i_node, j]
d = (d_lo + fabs(d_lo)) + (d_hi + fabs(d_hi))
min_dist[0] = fmax(min_dist[0], 0.5 * d)
- max_dist[0] = fmax(max_dist[0],
- fabs(pt[j] - tree.node_bounds[0, i_node, j]))
- max_dist[0] = fmax(max_dist[0],
- fabs(pt[j] - tree.node_bounds[1, i_node, j]))
+ max_dist[0] = fmax(max_dist[0], fabs(d_lo))
+ max_dist[0] = fmax(max_dist[0], fabs(d_hi))
else:
# as above, use the fact that x + abs(x) = 2 * max(x, 0)
for j in range(n_features):
