[MRG] MAINT: Fix cython warnings#13461
Conversation
sklearn/utils/seq_dataset.pxd.tp
Outdated
|
|
||
| }} | ||
|
|
||
| # cython: language_level=3 |
There was a problem hiding this comment.
I thought these need to be on top of the file.
There was a problem hiding this comment.
they are at the top of the cython file generated by this tp. but it wouldn't hurt to put it right at the top
|
Otherwise LGTM, thanks. If you feel like checking cython/gcc warnings, we have some gcc warnings complaining about signed/unsigned types being compared. You could even argue they're bugs. |
sklearn/utils/seq_dataset.pxd.tp
Outdated
|
|
||
| }} | ||
|
|
||
| # cython: language_level=3 |
There was a problem hiding this comment.
they are at the top of the cython file generated by this tp. but it wouldn't hurt to put it right at the top
sklearn/utils/seq_dataset.pyx.tp
Outdated
| WARNING: Do not edit .pyx file directly, it is generated from .pyx.tp | ||
| """ | ||
|
|
||
| # cython: language_level=3 |
There was a problem hiding this comment.
I don't suppose any of these need to be in the loop
|
|
||
| from sklearn.neighbors import quad_tree | ||
| from sklearn.neighbors cimport quad_tree | ||
| from sklearn.neighbors.quad_tree cimport _QuadTree |
|
@adrinjalali Most of the unsigned/signed errors come from using a signed int, such as scikit-learn/sklearn/utils/sparsefuncs_fast.pyx Lines 39 to 49 in 4957048 This was last changed here: https://github.com/scikit-learn/scikit-learn/pull/9663/files I will look into the unsigned/signed warning in another PR. |
This reverts commit c776e48.
This reverts commit c776e48.
What does this implement/fix? Explain your changes.
cython_language=3toseq_dataset.*.tp_QuadTree. Previously, there was an warning:This meant that the Cython code was going through Python to use
_QuadTree.3. Removes
from . cimport libsvm, because it is not cimportable: