Skip to content

Commit deefca2

Browse files
authored
MAINT Explicit cython options for better discovery (scikit-learn#27480)
1 parent 457b02c commit deefca2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

doc/developers/cython.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Tips to ease development
6363
# You might want to add this alias to your shell script config.
6464
alias cythonX="cython -X language_level=3 -X boundscheck=False -X wraparound=False -X initializedcheck=False -X nonecheck=False -X cdivision=True"
6565
66-
# This generates `source.c` as as if you had recompiled scikit-learn entirely.
66+
# This generates `source.c` as if you had recompiled scikit-learn entirely.
6767
cythonX --annotate source.pyx
6868
6969
* Using the ``--annotate`` option with this flag allows generating a HTML report of code annotation.

sklearn/_build_utils/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ def cythonize_extensions(extension):
7575
"initializedcheck": False,
7676
"nonecheck": False,
7777
"cdivision": True,
78+
"profile": False,
7879
}
7980

8081
return cythonize(
8182
extension,
8283
nthreads=n_jobs,
8384
compiler_directives=compiler_directives,
85+
annotate=False,
8486
)
8587

8688

sklearn/_loss/_loss.pxd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# cython: language_level=3
2-
31
# Fused types for input like y_true, raw_prediction, sample_weights.
42
ctypedef fused floating_in:
53
double

0 commit comments

Comments
 (0)