In the find_best_split function, the line "if np.any(left_indices) and np.any(right_indices)" is pretty redundant. It will save checking an empty split (= no split) for the last threshold, and might avoid some problems if the metric_func implementation can't handle an empty set.
In the find_best_split function, the line "if np.any(left_indices) and np.any(right_indices)" is pretty redundant. It will save checking an empty split (= no split) for the last threshold, and might avoid some problems if the metric_func implementation can't handle an empty set.