Skip to content

Commit

Permalink
was removed in the NumPy 2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Jun 19, 2024
1 parent 788fe0d commit 8be65c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for eccodes-python
============================

1.7.1 (2024-06-19)
--------------------
- `np.Infinity` was removed in the NumPy 2.0 release

1.7.0 (2024-02-26)
--------------------
- ECC-1761: Add function to extract message offsets and sizes
Expand Down
2 changes: 1 addition & 1 deletion gribapi/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import cffi

__version__ = "1.7.0"
__version__ = "1.7.1"

LOG = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion gribapi/gribapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def grib_multi_append(ingribid, startsection, multigribid):
@require(msgid=int, key=str)
def grib_get_size(msgid, key):
"""
@brief Get the size of an array key.
@brief Get the size of a key. Return 1 for scalar keys and >1 for array keys
\b Examples: \ref grib_get_keys.py "grib_get_keys.py",\ref count_messages.py "count_messages.py"
Expand Down
5 changes: 3 additions & 2 deletions tests/test_eccodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,8 @@ def test_grib_ecc_1007():

def test_grib_set_bitmap():
gid = eccodes.codes_grib_new_from_samples("GRIB2")
missing = np.Infinity
# Note: np.Infinity was removed in the NumPy 2.0 release. Use np.inf instead
missing = np.inf
eccodes.codes_set(gid, "bitmapPresent", 1)
eccodes.codes_set(gid, "missingValue", missing)
# Grid with 100 points 2 of which are missing
Expand Down Expand Up @@ -965,7 +966,7 @@ def test_bufr_copy_data():
# ---------------------------------------------
def test_grib_nearest2():
if "codes_grib_nearest_new" not in dir(eccodes):
return
pytest.skip("codes_grib_nearest_new absent")
gid = eccodes.codes_grib_new_from_samples("gg_sfc_grib2")
lat, lon = 40, 20
flags = eccodes.CODES_GRIB_NEAREST_SAME_GRID | eccodes.CODES_GRIB_NEAREST_SAME_POINT
Expand Down

0 comments on commit 8be65c9

Please sign in to comment.