atcollab / at

Accelerator Toolbox
Apache License 2.0
48 stars 31 forks source link

numpy 2.0 support #785

Closed lfarv closed 2 weeks ago

lfarv commented 2 weeks ago

Numpy 2.0 was released a few days ago. This new major version breaks the compatibility for both API and ABI. This resulted in crashes when loading AT. A fast fix was brought immediately by restricting AT to numpy < 2.0. This PR brings a longer term solution by fully supporting both numpy 1.x and numpy 2.0.

Both python code and C code are updated in a compatible way to support both versions. However numpy 2.0 is available only for python >= 3.9. So the build process is now different depending on the python version:

It also appeared that the action for building wheels was also failing. It has been upgraded

And finally, a workaround is implemented for a library bug on linux, allowing to run the full Matlab tests on the 3 platforms