-
Notifications
You must be signed in to change notification settings - Fork 191
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
Support numpy 2.0 #3033
Comments
We will need to review of copy as that API is changing: https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword |
In #3032 I set the minimal version numpy maybe a little bit too high. The reason is that pickled files before that version won't open in numpy 2.0 in the future: https://numpy.org/doc/stable/numpy_2_0_migration_guide.html#note-about-pickled-files And I know that @samuelgarcia cares about that. |
Other possible improvements once we bump to numpy 2.0:
They say they also make the sorting faster for numpy in 2.0. I am looking forward to test the sorting generation functions which use this feature. |
Here is the quantities NumPy 2.0 compatibility PR. python-quantities/python-quantities#232 |
Normally we are not saving numpy arrays with object in np.save() so normally the pickled by numpy should not happen. |
Would you rather relax the bound to the introduction of |
No sure to understand this. |
The second, it was introduced in 1.20 so that would need to lower bound if we are not concerned about future pickability. |
OK I understand now. I do not think that we have numpy.save() that do pickle internally. maybe I am wrong. |
I also feel that we should for 1.20. Let me do a brief search to see if we are pickling somewhere as a save. We should relax numpy before the next release. Let me open a PR and tag it so we don't forget : P |
Seems pynwb, hdmf-zarr, quantities, and neo support numpy 2 now. Are there other dependencies blocking numpy 2.0 in spikeinterface? |
Need to modify this PR to relax higher version on pyproject toml and see that everything works in the CI. Thanks for the reminder. |
No sure neo is totally yet numpy2 but almost. |
Neo just needs blackrock to support numpy 2.0 and then we are fully ready. Core Neo is compliant, but we have one last IO to do and then we are fully ready for 2.0. But blackrock rawio does name mangling so I hate working on it :( |
I can take the blackrock. |
We are not able -and it is not probably a good idea- to support numpy 2.0 as soon as possible.
The ecocsystem will take some time to adapt and we should wait some time until most libraries that use and interact with spikeinterface support numpy 2.0 so we don't create problems for them.
We should though start deprecating functions and removing things that are not supported by 2.0 when that is possible. The PR #3032 takes some steps in that direction.
One big roadblock is that some libraries used heavily by this package require lower bounds on their versions for supporting numpy 2.0. Here they are:
numba 0.60.0 (with caveats, see)
h5py 3.11
hdmf-zarr 0.7.0
scipy release 1.13
pandas 2.2.2
pynwb and hdmf-zarr don't support numpy 2.0 yet. So we can't install them if we install numpy 2.0
We can keep this an open issue discuss how, when and related issues.
The text was updated successfully, but these errors were encountered: