Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Fixes
* Fixes issue with ``Delta`` Zarr 3 codec not working with ``astype``.
By :user:`Norman Rzepka <normanrz>`, :issue:`664`

* Removed Version Check: The previous code included a check for the `NumPy` version
and a warning if the version was incompatible with `zfpy`.
This check has been removed because `zfpy` now supports the newer versions of `NumPy`.
By :user:`Meher Gajula <me-her>`, :issue:`672`

Improvements
~~~~~~~~~~~~
Expand Down
16 changes: 2 additions & 14 deletions numcodecs/zfpy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import warnings
from contextlib import suppress
from importlib.metadata import PackageNotFoundError, version
from types import ModuleType
Expand All @@ -11,19 +10,8 @@
_zfpy_version = tuple(map(int, version("zfpy").split(".")))

if _zfpy_version:
# Check NumPy version
_numpy_version: tuple = tuple(map(int, version("numpy").split('.')))
if _numpy_version >= (2, 0, 0) and _zfpy_version <= (1, 0, 1): # pragma: no cover
_zfpy_version = ()
warnings.warn(
"NumPy version >= 2.0.0 detected. The zfpy library is incompatible with this version of NumPy. "
"Please downgrade to NumPy < 2.0.0 or wait for an update from zfpy.",
UserWarning,
stacklevel=2,
)
else:
with suppress(ImportError):
import zfpy as _zfpy # type: ignore[no-redef]
with suppress(ImportError):
import zfpy as _zfpy # type: ignore[no-redef]

Check warning on line 14 in numcodecs/zfpy.py

View check run for this annotation

Codecov / codecov/patch

numcodecs/zfpy.py#L13-L14

Added lines #L13 - L14 were not covered by tests

if _zfpy:
import numpy as np
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ msgpack = [
"msgpack",
]
zfpy = [
"zfpy>=1.0.0",
"numpy<2.0.0",
"zfpy>=1.0.0"
]
pcodec = [
"pcodec>=0.3,<0.4",
Expand Down
Loading