-
Notifications
You must be signed in to change notification settings - Fork 143
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
Updating for NumPy 2.0 #1588
Comments
Thanks heaps for raising this issue, @andrew-s28! Yes, please go ahead and create a PR for the The C code generation doesn't rely on If we find other issues in the coming weeks, at least we know what the first line of investigation is :-) |
also had this issue when installing via conda on linux following the parcels installation tutorial. Upgrading parcels via pip solved the issue: pip install --upgrade parcels |
@mchoblet Would you be able to recreate that process, but by providing the output of I'm surprised you had to downgrade zarr since #1329 is about setting a min version (not a max version), and that zarr 2.18 is working for me. Also surprised that installing the latest Parcels via conda didn't work out the box for you. Which version of Parcels are you installing? |
Hi @VeckoTheGecko, thanks for checking in that fast. So, I just run the following commands (as detailed here: https://docs.oceanparcels.org/en/latest/installation.html) on the cluster I am working on:
I get:
So I do in fact get the older parcels version 2.4.2 (as listed here for linux-64: https://anaconda.org/conda-forge/parcels), as well as the zarr version 3.0.2 Hope this is somehow useful for you, or would it be even better if I install each package separately and give you the env export at each step? |
@mchoblet Huh, strange! Not sure why its pulling
Just a note that installing older versions of Parcels might run into dependency incompatibility like this (unless you manually specify the dependency versions). This is just the nature of installing old packages, as the scientific python sphere advances. Let me know if that helps! (/what that says) |
That command does pull the latest version of parcels correctly, and it also pulls an older version of zarr (2.18). I tried on my personal laptop, and that pulled the right version of parcels without specifying the version. Maybe its because of the Anaconda version (2022.05) that is installed on the cluster? I don't know much about what conda is doing in the background... |
We don't have support for v3 yet, so this makes sense. v3 was only quite recently released as well.
I'm not sure - perhaps something to bring up with your sysadmins :) |
NumPy's first major version update in years has officially released, and if one follows the parcels installation tutorial they will find themselves with NumPy v2.0.0 installed by default.
The only breaking change that I could find for parcels is the use of
np.infty
, which has been deprecated in favor ofnp.inf
in NumPy 2.0.0. I haven't found any other breaking changes, and with just the changing ofnp.infty
->np.inf
, the examplepython example_peninsula.py --fieldset 100 100
runs without error, but I haven't done any more testing than this.I can submit a PR and get
np.infty
changed easily, and it is of course backwards compatible with the current NumPy and parcels versions. I just wanted to open this issue first to start a conversation and see if anyone can find any other breaking changes in NumPy 2.0.0 (especially the NumPy C API, since I'm not well versed in the C code generation used in parcels or if it relies on NumPy at all), or if this has been thought about by others yet.The text was updated successfully, but these errors were encountered: