8000 Let's try to recythonize everything · scikit-learn/scikit-learn@b41f9e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit b41f9e3

Browse files
committed
Let's try to recythonize everything
1 parent da5a85b commit b41f9e3

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

sklearn/tree/_criterion.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ cdef class Criterion:
2424
# such as the mean in regression and class probabilities in classification.
2525

2626
# Internal structures
27+
# Comment!
2728
cdef DOUBLE_t* y # Values of y
2829
cdef SIZE_t y_stride # Stride in y (since n_outputs >= 1)
2930
cdef DOUBLE_t* sample_weight # Sample weights

sklearn/tree/_criterion.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ cdef class Criterion:
4646
free(self.sum_right)
4747

4848
def __getstate__(self):
49+
"""Let's try to recythonize it"""
4950
return {}
5051

5152
def __setstate__(self, d):

sklearn/tree/_tree.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ cdef class TreeBuilder:
9898
cdef inline _check_input(self, object X, np.ndarray y,
9999
np.ndarray sample_weight):
100100
"""Check input dtype, layout and format"""
101+
"""Let's try to recythonize it"""
101102
if issparse(X):
102103
X = X.tocsc()
103104
X.sort_indices()

sklearn/tree/_utils.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ np.import_array()
2828
cdef realloc_ptr safe_realloc(realloc_ptr* p, size_t nelems) except *:
2929
# sizeof(realloc_ptr[0]) would be more like idiomatic C, but causes Cython
3030
# 0.20.1 to crash.
31+
"""Let's try to recythonize it"""
3132
cdef size_t nbytes = nelems * sizeof(p[0][0])
3233
if nbytes / sizeof(p[0][0]) != nelems:
3334
# Overflow in the multiplication

0 commit comments

Comments
 (0)
0