Skip to content
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

Numpy v2 support #159

Closed
maresb opened this issue Oct 9, 2024 · 3 comments · Fixed by #193
Closed

Numpy v2 support #159

maresb opened this issue Oct 9, 2024 · 3 comments · Fixed by #193

Comments

@maresb
Copy link

maresb commented Oct 9, 2024

I would like to be able to use the Python API in Python environments that I have already upgraded to Numpy v2. Currently I can't do this with a release version due to

numpy = ">=1.23.0,<2.0.0"

The version notes for v1.3.1 mention pydata/xarray#9179 as blocking, but it has since been merged and released.

Before finding this repo on GitHub I chatted with Leïla on the website. She pointed me to pydata/xarray#9545, which seems to be a performance regression.

Question: If I were to unpin numpy<2 on my fork (using v1.3.3 by default, or possibly another tag), pin to the latest xarray, and accept the performance regression, are there any other blockers or potential for incorrect data that I should be aware of?

@veenstrajelmer
Copy link

veenstrajelmer commented Oct 9, 2024

Thanks for creating this issue. I think it is good if copernicusmarine would support numpy v2 soon. This is also one of the blockers for python 3.13 support: #158

@renaudjester
Copy link
Collaborator

Hi @maresb,

Indeed it's a performance regression that should be fixed in the next release of xarray. It basically add 5 seconds every time you do: xarray.open_dataset

We haven't noticed any other problems. However, it hasn't been extensively tested as we discovered the two bugs one after the other. And the first one was on the data itself (no errors or anything).

So theoretically, yeah you are good to go if you accept the performance regression!

Don't hesitate to report any other issues you find :D

@maresb
Copy link
Author

maresb commented Oct 22, 2024

I haven't tested this so thoroughly, but so far it seems like it's working. In case anyone else wants to give this a try:

pip install maresb-copernicusmarine-unpin-numpy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants