-
-
Notifications
You must be signed in to change notification settings - Fork 26k
FIX Explicit int cast in NN binary trees #18654
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
Conversation
This issue is being investigated in #18644 (I think that it is related with the downcasting for |
Sounds good, feel free to close if this isn't the preferred solution (though it at least makes some sense since I think this is what was implicitly happening before anyway?) |
That is. An implicit conversion from WDYT @thomasjpfan? |
@alfaro96 I am seeing this in multiple issues. I think we need to start being more careful and do explicit casting from now on. |
Then, let us merge this PR. I will submit another PR applying explicit casting to the Cython extension modules causing the failure in the |
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.
LGTM @larsoner.
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.
LGTM
Thanks @larsoner ! |
Using latest NumPy and scikit-learn master and Cython , I get:
I assume this has to do with more strict type checking somewhere, so this just uses an explicit cast.
I'm not 100% sure this is the right fix, but things at least seem to work with it in place.