Skip to content

Fix formatting output data with NumPy 2.x #1513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mgorny
Copy link

@mgorny mgorny commented Mar 17, 2025

Fix the common _write_data() function to use a regular formatting rather than repr() when writing numbers to a file. With NumPy 2.x, the latter resulted in literal np.float64(…) ending up in the data file.

Fixes #1499

mgorny added 2 commits March 17, 2025 12:10
Fix the common `_write_data()` function to use a regular formatting
rather than `repr()` when writing numbers to a file.  With NumPy 2.x,
the latter resulted in literal `np.float64(…)` ending up in the data
file.

Part of bug nschloe#1499
@penguinpee
Copy link

With the additional commit this fixes #1499 and obsoletes PR #1506 and PR #1514.

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.

[BUG] Tests fail with NumPy 2.2.0
2 participants