Skip to content

Draft: Fix/numpy2 support

Miron van der Kolk requested to merge fix/numpy2-support into develop

What does this MR do and why?

This MR is a preparation for the eventual release of numpy 2.0, see #584

The pipeline of this MR will try to run with the latest development versions of numpy, matplotlib and scipy.

There is currently an issue with sympy and numpy 2, hopefully it will get resolved before the release

Sympy fixed their issue, we just have to wait for them to release.

Nightly builds are available here https://anaconda.org/scientific-python-nightly-wheels/

You can see the numpy changelog here https://numpy.org/devdocs/release/2.0.0-notes.html

At time of writing, all tests pass (locally, not installing the sympy from source in the pipelines)

How to set up and validate locally

  1. Make a clean conda/python environment
  2. Install this branch

First need latest dev sympy (they don't do dev releases)

pip install mpmapth
git clone https://github.com/sympy/sympy.git
cd sympy
pip install .
cd finesse3
git checkout fix/numpy2-support
pip install --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple -e .[test]
  1. Verify that dev versions were installed:

    $ pip list | grep -iE 'scipy|numpy|matplotlib|sympy'
    matplotlib                    3.9.0.dev0
    numpy                         2.0.0.dev0
    scipy                         1.13.0.dev0
    sympy                         1.13.dev0              /home/miron/src/sympy
  2. Run tests pytest tests

  3. Create docs cd docs && make html

MR acceptance checklist

  • Committer/reviewer has ran the documentation stage when ready to merge
Edited by Miron van der Kolk

Merge request reports