Skip to content

Commit 8be65c9

Browse files
committed
was removed in the NumPy 2.0 release
1 parent 788fe0d commit 8be65c9

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Changelog for eccodes-python
33
============================
44

5+
1.7.1 (2024-06-19)
6+
--------------------
7+
- `np.Infinity` was removed in the NumPy 2.0 release
8+
59
1.7.0 (2024-02-26)
610
--------------------
711
- ECC-1761: Add function to extract message offsets and sizes

gribapi/bindings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import cffi
2323

24-
__version__ = "1.7.0"
24+
__version__ = "1.7.1"
2525

2626
LOG = logging.getLogger(__name__)
2727

gribapi/gribapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def grib_multi_append(ingribid, startsection, multigribid):
581581
@require(msgid=int, key=str)
582582
def grib_get_size(msgid, key):
583583
"""
584-
@brief Get the size of an array key.
584+
@brief Get the size of a key. Return 1 for scalar keys and >1 for array keys
585585
586586
\b Examples: \ref grib_get_keys.py "grib_get_keys.py",\ref count_messages.py "count_messages.py"
587587

tests/test_eccodes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,8 @@ def test_grib_ecc_1007():
576576

577577
def test_grib_set_bitmap():
578578
gid = eccodes.codes_grib_new_from_samples("GRIB2")
579-
missing = np.Infinity
579+
# Note: np.Infinity was removed in the NumPy 2.0 release. Use np.inf instead
580+
missing = np.inf
580581
eccodes.codes_set(gid, "bitmapPresent", 1)
581582
eccodes.codes_set(gid, "missingValue", missing)
582583
# Grid with 100 points 2 of which are missing
@@ -965,7 +966,7 @@ def test_bufr_copy_data():
965966
# ---------------------------------------------
966967
def test_grib_nearest2():
967968
if "codes_grib_nearest_new" not in dir(eccodes):
968-
return
969+
pytest.skip("codes_grib_nearest_new absent")
969970
gid = eccodes.codes_grib_new_from_samples("gg_sfc_grib2")
970971
lat, lon = 40, 20
971972
flags = eccodes.CODES_GRIB_NEAREST_SAME_GRID | eccodes.CODES_GRIB_NEAREST_SAME_POINT

0 commit comments

Comments
 (0)