Currently, importing pygrib results in: >>> import pygrib Traceback (most recent call last): File "<python-input-0>", line 1, in <module> import pygrib File "/usr/lib64/python3.13/site-packages/pygrib/__init__.py", line 2, in <module> from ._pygrib import * File "src/pygrib/_pygrib.pyx", line 1, in init pygrib._pygrib ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject A simple bump and rebuild should fix that. Reproducible: Always
pygrib is failing to build with a test failure: Trying: latsubset.min(),latsubset.max(),lonsubset.min(),lonsubset.max() Expecting: (15.0, 65.0, 220.0, 320.0) ********************************************************************** File "/home/orion/fedora/pygrib/pygrib-2.1.6-build/pygrib-f52c4cb4b10672f2400774524be01f45fbc004a2-tmp-test/test/test.py", line 207, in __main__.test Failed example: latsubset.min(),latsubset.max(),lonsubset.min(),lonsubset.max() Expected: (15.0, 65.0, 220.0, 320.0) Got: (np.float64(15.0), np.float64(65.0), np.float64(220.0), np.float64(320.0)) I reported that upstream.
For now we can just revert to the old representation of scalars using `np.set_printoptions(legacy="1.25")` [1]. I've submitted PRs upstream and downstream. [1] https://numpy.org/doc/2.2/release/2.0.0-notes.html#representation-of-numpy-scalars-changed