-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Drop Numpy includes #5842
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
Drop Numpy includes #5842
Conversation
In cython#5820 (comment) @mattip suggests that Cython providing slightly different Numpy includes is a source of confusing error messages. They've been in Numpy for a reasonable length of time now, so it's probably time to drop Cython's copy. It'll hopefully avoid people raising issues about Cython's copy too.
|
The one issue seems to be that Numpy don't seem to have adopted the math.pxd file in the Numpy directory. I can find quite a few people using it, including Numpy themselves (https://github.com/numpy/numpy/blob/605e34577affa99fd49bbb6156843953b81d92b8/numpy/random/_common.pyx#L8) so unless I'm missing something, we may not be in a position to remove it |
|
aargh. Sorry, we seem to have missed that: see numpy/numpy#25177. I guess Cython could drop the |
|
CI is passing other than the PyPy trashcan test, skipped in #5832. |
|
About @rgommers commented on elsewhere that perhaps the bettter solution is for cython to drop the file:
|
|
Is there any indication that |
Looks like Scipy and Pandas both use it (just for NaN/INFINITY constants). scikit-learn looks to have used it until 2023 but it's probably been removed. A bunch of smaller projects also look to use it. I suspect not for anything irreplaceable, but I'm reluctant to cause that much disruption deliberately. |
|
The SciPy usage was one very recently introduced line that I missed - I just opened a PR to remove it again. Pandas I think it would be good to at least approve the deprecation, conditional on code findable with GitHub code search being cleaned up first. Now that Cython 3 is kind of a "fresh" start with many much more disruptive changes than this one, it'd be nice to get rid of this. |
|
I think this PR could be merged as-is. The use of |
|
Yeah I think I agree with this conclusion. I'll merge this for 3.1. I mostly agree that we should drop numpy.math too. I'll make another PR for that but won't merge it unilaterally. |
See discussion in cython#5842. This file was in Numpy until faily recently so dropping it is potentially breaking. However, it'd still be nice to remove it so putting it up for review.
In #5820 (comment) @mattip suggests that Cython providing slightly different Numpy includes is a source of confusing error messages.
They've been in Numpy for a reasonable length of time now, so it's probably time to drop Cython's copy. It'll hopefully avoid people raising issues about Cython's copy too.