Summary
The current numpy = "<2" pin in pixi.toml blocks environment solves as conda-forge moves to numpy 2.x by default. This issue proposes lifting it and asks the team to decide on two things.
Changes needed in underworld3 source
Several numpy 1.x APIs removed or deprecated in numpy 2.0 need replacing:
- np.double → np.float64 (8 files)
- np.row_stack → np.vstack (1 file)
- np.core.* → public API equivalents in unit_aware_array.py
- np.cross on 2D vectors → explicit z-component in discretisation_mesh.py
- array(self) → array(self, dtype=None, copy=None) in 4 array-view classes
A prototype branch with all changes passes core single-process and 4-rank MPI tests with numpy 2.4.6 and PETSc 3.25.
Discussion points
- Accept the source changes? This is a clean break — numpy < 2 would no longer be supported.
- Minimum PETSc version for custom/HPC builds? I think this is 3.21.0?
Summary
The current numpy = "<2" pin in pixi.toml blocks environment solves as conda-forge moves to numpy 2.x by default. This issue proposes lifting it and asks the team to decide on two things.
Changes needed in underworld3 source
Several numpy 1.x APIs removed or deprecated in numpy 2.0 need replacing:
A prototype branch with all changes passes core single-process and 4-rank MPI tests with numpy 2.4.6 and PETSc 3.25.
Discussion points