Skip to content
Merged
Changes from all 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
3 changes: 2 additions & 1 deletion numcodecs/delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def encode(self, buf):
enc[0] = arr[0]

# compute differences
enc[1:] = np.diff(arr)
# using np.subtract for in-place operations
np.subtract(arr[1:], arr[0:-1], out=enc[1:])

return enc

Expand Down
Loading