GeoStat-Framework / PyKrige

Kriging Toolkit for Python
https://pykrige.readthedocs.io
BSD 3-Clause "New" or "Revised" License
758 stars 188 forks source link

Add numpy2 support #290

Closed MuellerSeb closed 4 months ago

MuellerSeb commented 4 months ago

Since numpy 2 is around the corner (https://github.com/numpy/numpy/issues/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.

jakirkham commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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