-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MAINT fix cython 3 compilation errors #26771
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
Just curious, do you understand the reason for the cython enum? |
Also is it worth reporting to cython as a breaking change (even if the fix is straightforward)? |
Not deeply. It looks like cython is trying to do |
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.
I dont‘t like that we define the same constant 3 times, but that‘s not the point of this PR.
RAND_R_MAX = 0x7FFFFFFF | ||
# It corresponds to the maximum representable value for | ||
# 32-bit signed integers (i.e. 2^31 - 1). | ||
RAND_R_MAX = 2147483647 |
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.
Have you compares, if cd gives the same results?
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.
The doc tests are meant to ensure that. Like the example in the docstring of GraphicalLasso
, which uses enet_coordinate_descent
.
also:
In [4]: %%cython
...: cdef enum:
...: R = 0x7FFFFFFF
...: print(R)
...:
2147483647
me neither. I tried to resolve that and get rid of the enum a while ago and it didn't go well at all :) |
OK let's merge this one! |
Cython compilation errors seen in scipy dev build with cython 3.0.0rc1.dev0.