Closed ax3l closed 3 months ago
attn @dpgrote @RemiLehe @roelof-groenewald @EZoni @WeiqunZhang
I do not yet understand where the error exactly comes from :sweat_smile: Is this a np.float64
that is injected in an AMReX parser expression by accident?
If someone sees it feel free to post here so we can address it.
@dpgrote @WeiqunZhang I think this comes from the CLI arguments we pass from PICMI into AMReX, but cannot find where it comes from yet...
Testing numpy2, with repr, it returns "np.float64(3e-14)" instead of "3e-14" as was done in numpy1. The solution may be to use "str" instead of "repr" in the several places in Python/pywarpx/Bucket.py.
Thanks @dpgrote, good catch! Shall I post a PR or do you want to?
I assume the challenge is how to properly round numbers with many user-specified digits (float or exponential style) to strings without cropping them... I cannot see that repr
does that better than str
btw, which the inline comment suggests in Bucket.py
)
With the latest NumPy 2.0 release, we need to make sure all our examples and Python scripts still work.
Seeing some tests fail in Conda-Forge https://github.com/conda-forge/warpx-feedstock/pull/86
e.g., running the
laser_acceleration/PICMI_inputs_3d.py
test: