From 30ea6aae7f358c4844f31047819d5437a692287f Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Mon, 6 May 2024 14:23:51 -0700 Subject: [PATCH 1/3] use np.inf instead of PINF/NINF --- zarr/meta.py | 4 ++-- zarr/tests/test_meta.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zarr/meta.py b/zarr/meta.py index 4b360270d..747d8bec8 100644 --- a/zarr/meta.py +++ b/zarr/meta.py @@ -227,9 +227,9 @@ def decode_fill_value(cls, v: Any, dtype: np.dtype, object_codec: Any = None) -> if v == "NaN": return np.nan elif v == "Infinity": - return np.PINF + return np.inf elif v == "-Infinity": - return np.NINF + return -np.inf else: return np.array(v, dtype=dtype)[()] elif dtype.kind in "c": diff --git a/zarr/tests/test_meta.py b/zarr/tests/test_meta.py index c85d3f923..54347835d 100644 --- a/zarr/tests/test_meta.py +++ b/zarr/tests/test_meta.py @@ -382,8 +382,8 @@ def test_encode_decode_array_structured(): def test_encode_decode_fill_values_nan(): fills = ( (np.nan, "NaN", np.isnan), - (np.NINF, "-Infinity", np.isneginf), - (np.PINF, "Infinity", np.isposinf), + (-np.inf, "-Infinity", np.isneginf), + (np.inf, "Infinity", np.isposinf), ) for v, s, f in fills: From 8372095e634b4017b7fe207b7a5a5da3c5b5c2de Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Mon, 6 May 2024 15:37:47 -0700 Subject: [PATCH 2/3] update release notes --- docs/release.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/release.rst b/docs/release.rst index 5184ab5f9..0cb177721 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -25,9 +25,8 @@ Unreleased Enhancements ~~~~~~~~~~~~ -* Performance improvement for reading and writing chunks if any of the dimensions is size 1. :issue:`1730` - By :user:`Deepak Cherian `. - +* Performance improvement for reading and writing chunks if any of the dimensions is size 1. + By :user:`Deepak Cherian ` :issue:`1730`. Docs ~~~~ @@ -35,16 +34,15 @@ Docs Maintenance ~~~~~~~~~~~ +* Minor updates to use `np.inf` instead of `np.PINF` / `np.NINF` in preparation for NumPy 2.0.0 release. + By :user:`Joe Hamman ` :issue:`1842`. Deprecations ~~~~~~~~~~~~ * Deprecate experimental v3 support by issuing a `FutureWarning`. Also updated docs to warn about using the experimental v3 version. - By :user:`Joe Hamman ` :issue:`1802` and :issue: `1807`. - -Deprecations -~~~~~~~~~~~~ + By :user:`Joe Hamman ` :issue:`1802` and :issue:`1807`. * Deprecate the following stores: :class:`zarr.storage.DBMStore`, :class:`zarr.storage.LMDBStore`, :class:`zarr.storage.SQLiteStore`, :class:`zarr.storage.MongoDBStore`, :class:`zarr.storage.RedisStore`, and :class:`zarr.storage.ABSStore`. These stores are slated to be removed from Zarr-Python in version 3.0. From 804e2eaf6b35b56a6ef14cb9519adb1a3a59fb0f Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Mon, 6 May 2024 15:44:23 -0700 Subject: [PATCH 3/3] doc: cleanup release notes for 2.18.0 --- docs/release.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/release.rst b/docs/release.rst index 0cb177721..829f325f7 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -18,19 +18,16 @@ Release notes See `GH1777 `_ for more details on the upcoming 3.0 release. -.. _unreleased: +.. _release_2.18.0: -Unreleased ----------- +2.18.0 +------ Enhancements ~~~~~~~~~~~~ * Performance improvement for reading and writing chunks if any of the dimensions is size 1. By :user:`Deepak Cherian ` :issue:`1730`. -Docs -~~~~ - Maintenance ~~~~~~~~~~~