Skip to content

Commit d8d53bb

Browse files
authored
Revert change to delta filter (#677)
1 parent f005306 commit d8d53bb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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):

0 commit comments

Comments
 (0)