Skip to content

Commit 823b044

Browse files
authored
Merge branch 'main' into typing
2 parents 6ce6c73 + d8d53bb commit 823b044

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ jobs:
5050
- name: Install numcodecs
5151
run: |
5252
export DISABLE_NUMCODECS_AVX2=""
53-
# TODO: put back zfpy import when it supports numpy 2.0
54-
python -m pip install -v -e .[test,test_extras,msgpack,crc32c,pcodec]
53+
python -m pip install -v -e .[test,test_extras,msgpack,crc32c,pcodec,zfpy]
5554
5655
- name: Install zarr-python
5756
# Since zarr v3 requires numpy >= 1.25, on Python 3.11 leave it out
@@ -60,11 +59,6 @@ jobs:
6059
# TODO: remove --pre option when zarr v3 is out
6160
run: python -m pip install --pre zarr>=3.0.0b2
6261

63-
# This is used to test with zfpy, which does not yet support numpy 2.0
64-
- name: Install older numpy and zfpy
65-
if: matrix.python-version == '3.11'
66-
run: python -m pip install -v ".[zfpy]"
67-
6862
- name: List installed packages
6963
run: python -m pip list
7064

numcodecs/delta.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@ def encode(self, buf):
6363
enc[0] = arr[0]
6464

6565
# compute differences
66-
# using np.subtract for in-place operations
67-
if arr.dtype == bool:
68-
np.not_equal(arr[1:], arr[:-1], out=enc[1:])
69-
else:
70-
np.subtract(arr[1:], arr[:-1], out=enc[1:])
71-
66+
enc[1:] = np.diff(arr)
7267
return enc
7368

7469
def decode(self, buf, out=None):

numcodecs/tests/test_vlen_bytes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ def test_decode_errors():
8484
codec.decode(enc, out=np.zeros(10, dtype='i4'))
8585

8686

87+
# TODO: fix this test on GitHub actions somehow...
88+
# See https://github.com/zarr-developers/numcodecs/issues/683
89+
@pytest.mark.skip("Test is failing on GitHub actions.")
8790
def test_encode_none():
8891
a = np.array([b'foo', None, b'bar'], dtype=object)
8992
codec = VLenBytes()

0 commit comments

Comments
 (0)