-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MNT Removing Cython compilation warnings in WeightVector template #20739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -18,16 +18,24 @@ dtypes = [('64', 'double', 1e-9), | |||||||||||||||
|
||||||||||||||||
}} | ||||||||||||||||
|
||||||||||||||||
# cython: language_level=3 | ||||||||||||||||
# cython: cdivision=True | ||||||||||||||||
# cython: boundscheck=False | ||||||||||||||||
# cython: wraparound=False | ||||||||||||||||
# cython: profile=False | ||||||||||||||||
# cython: linetrace=False | ||||||||||||||||
# cython: initializedcheck=False | ||||||||||||||||
# cython: binding=False | ||||||||||||||||
# distutils: define_macros=CYTHON_TRACE_NOGIL=0 | ||||||||||||||||
Comment on lines
+25
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The profiling and linetracing is false by default.
Suggested change
Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The purpose of setting directives explicitly for files is that it allows generating code for given file (using We should probably remove them anyway, yes. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it is relevant setting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay lets keep |
||||||||||||||||
# | ||||||||||||||||
# Author: Peter Prettenhofer <peter.prettenhofer@gmail.com> | ||||||||||||||||
# Lars Buitinck | ||||||||||||||||
# Danny Sullivan <dsullivan7@hotmail.com> | ||||||||||||||||
# | ||||||||||||||||
# License: BSD 3 clause | ||||||||||||||||
|
||||||||||||||||
# WARNING: Do not edit this .pyx file directly, it is generated from its .pyx.tp | ||||||||||||||||
|
||||||||||||||||
cimport cython | ||||||||||||||||
from libc.limits cimport INT_MAX | ||||||||||||||||
from libc.math cimport sqrt | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm we do set language_level globally here:
scikit-learn/sklearn/_build_utils/__init__.py
Line 79 in 21eb468
but it is a little nicer to set it explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per indicated in the other thread, it helps generating code for this file solely if needed, but probably this should be removed.