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

Add numpy2 support #290

Merged
merged 10 commits into from
May 27, 2024
Merged

Add numpy2 support #290

merged 10 commits into from
May 27, 2024

Conversation

MuellerSeb
Copy link
Member

@MuellerSeb MuellerSeb commented May 27, 2024

Since numpy 2 is around the corner (numpy/numpy#24300), we need to be prepared.

numpy 2.0rc1 is already available and can be used as a build time dependency, so we will use this to build our wheels in the CI.

I removed support for 32bit wheels and also removed the separately built universal2 wheels for macOS, since we already provide wheels for intel and arm64.

@MuellerSeb MuellerSeb self-assigned this May 27, 2024
@MuellerSeb MuellerSeb marked this pull request as draft May 27, 2024 20:55
@MuellerSeb MuellerSeb added this to the v1.7.2 milestone May 27, 2024
@MuellerSeb MuellerSeb changed the title Draft: Add numpy2 support Add numpy2 support May 27, 2024
@MuellerSeb MuellerSeb marked this pull request as ready for review May 27, 2024 21:53
@MuellerSeb MuellerSeb merged commit e02baad into main May 27, 2024
28 of 29 checks passed
@MuellerSeb MuellerSeb deleted the add_numpy2_support branch May 27, 2024 22:09
@jakirkham
Copy link

Thanks Sebastian! 🙏

In order to ensure the wheels are compatible with NumPy 2, would recommend building with the NumPy 2 RC. The wheels built this way will work with NumPy 1 & 2

Just looking at the CI scripts, it appears these may be built with NumPy 1, which wouldn't be NumPy 2 compatible. Though please let me know if I've just missed something about how the builds work here

@MuellerSeb
Copy link
Member Author

MuellerSeb commented May 31, 2024

Hey there,

IMHO the wheels should be built with np 2rc. The important lines are in the pyproject.toml:

     "numpy>=2.0.0rc1,<2.3; python_version >= '3.9'", 
     "scipy>=1.13.0,<2; python_version >= '3.9'", 
     "oldest-supported-numpy; python_version < '3.9'", 
     "scipy>=1.3.2,<2; python_version < '3.9'",

Since the wheels are built with cibuildwheel, these versions should be used.

maybe you confused this with the versions in the testing matrix?

@jakirkham
Copy link

Ah ok. Maybe I did. Thanks for the clarification Sebastian! 🙏

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

Successfully merging this pull request may close these issues.

None yet

2 participants