We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38a50f4 commit fb67c7bCopy full SHA for fb67c7b
sklearn/neighbors/_binary_tree.pxi
@@ -1074,7 +1074,8 @@ cdef class BinaryTree:
1074
# determine number of levels in the tree, and from this
1075
# the number of nodes in the tree. This results in leaf nodes
1076
# with numbers of points between leaf_size and 2 * leaf_size
1077
- self.n_levels = np.log2(fmax(1, (n_samples - 1) / self.leaf_size)) + 1
+ self.n_levels = int(
1078
+ np.log2(fmax(1, (n_samples - 1) / self.leaf_size)) + 1)
1079
self.n_nodes = (2 ** self.n_levels) - 1
1080
1081
# allocate arrays for storage
0 commit comments