Skip to content

Conversation

@vdbma
Copy link
Member

@vdbma vdbma commented Oct 18, 2024

idfx_io.py used np.product which is deprecated in numpy >= 2.0 (https://numpy.org/devdocs/numpy_2_0_migration_guide.html). Replaced by np.prod.

@neutrinoceros
Copy link
Collaborator

neutrinoceros commented Oct 18, 2024

@vdbma I would also recommend adding the following patch to detect numpy 2 incompatible code uses at commit time:

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 06fe7210..85926501 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -33,6 +33,7 @@ repos:
         - F # pyflakes
         - B # flake8-bugbear
         - I # isort
+        - NPY # numpy-specific rules

   - repo: https://github.com/neutrinoceros/inifix
     rev: v5.0.2

furthermore, you'll need to rebase your branch on top of, and target develop for this PR (linting issues are already solved there)

@glesur glesur changed the base branch from master to develop October 19, 2024 20:39
@neutrinoceros neutrinoceros merged commit 10725f7 into idefix-code:develop Oct 21, 2024
@glesur glesur mentioned this pull request Oct 23, 2024
glesur added a commit that referenced this pull request Oct 24, 2024
## [2.1.02] 2024-10-24
### Changed

- Fix a bug that could lead to corrupted VTK file when using single precision arithmetic (#255)
- Fix a bug that could lead to incorrect central mass gravitational potential upon restart (#287)
- Changed the way magnetic field is reconstructed when using grid coarsening to reduce roundoff errors on div(B). This can have an impact on the results of models using grid coarsening+MHD (#284)
- Ensure that XDMF outputs are precision agnostic (#261)
- Bump up Kokkos version to 4.4.01 (#289)
- Check that writes are successfull in serial, otherwise throw an error (#260)
- Ensure that shock flattening flags can be modified by user (#260)
- Throw an error when user enables Fargo without enough DIMENSIONS (#250)
- Fix linting errors following upgrade to cpplint 2.0 (#278, #279, #281)
- Update idfx_io to numpy 2.0 (#283)

### Added

- Allow the user to define the grid and boundary conditions only on active dimensions (#274)
- Configuration for Nvidia H100 on Jean Zay in the documentation
---------

Co-authored-by: Nicolas Aunai <nicolas.aunai@lpp.polytechnique.fr>
Co-authored-by: vdbma <93188557+vdbma@users.noreply.github.com>
Co-authored-by: Marc Van den Bossche <marc.vanden-bossche@univ-grenoble-alpes.fr>
Co-authored-by: Alankar Dutta <dutta.alankar@gmail.com>
Co-authored-by: Alankar Dutta <alankard@MB-167.local>
Co-authored-by: ThomasJannaudCAM <159052976+ThomasJannaudCAM@users.noreply.github.com>
Co-authored-by: Clément Robert <cr52@protonmail.com>
Co-authored-by: marc <vandenbossche.marc@hotmail.com>
Co-authored-by: Antonin Borderies <89980449+Anto6453@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants