Skip to content

Commit 34e540a

Browse files
committed
Fix splitter
Signed-off-by: Adam Li <adam2392@gmail.com>
1 parent df0fae2 commit 34e540a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sklearn/tree/_splitter.pyx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ cdef class BaseSplitter:
110110
"""Copy the value of node samples[start:end] into dest."""
111111
pass
112112

113-
cdef inline void clip_node_value(self, double* dest, double lower_bound, double upper_bound) noexcept nogil:
113+
cdef void clip_node_value(self, double* dest, double lower_bound, double upper_bound) noexcept nogil:
114114
"""Clip the value of node samples[start:end] into dest."""
115115
pass
116116

@@ -310,11 +310,6 @@ cdef class Splitter(BaseSplitter):
310310
"""Copy the samples[start:end] into dest."""
311311
self.criterion.node_samples(dest)
312312

313-
cdef inline void clip_node_value(self, double* dest, double lower_bound, double upper_bound) noexcept nogil:
314-
"""Clip the value in dest between lower_bound and upper_bound for monotonic constraints."""
315-
316-
self.criterion.clip_node_value(dest, lower_bound, upper_bound)
317-
318313
cdef double node_impurity(self) noexcept nogil:
319314
"""Return the impurity of the current node."""
320315

0 commit comments

Comments
 (0)