Skip to content

Commit 6f408de

Browse files
committed
Add a comment explaining use of subtract for speed
1 parent 64b2bc0 commit 6f408de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

numcodecs/delta.py

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

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

6970
return enc

0 commit comments

Comments
 (0)