Skip to content

Commit b7bb7ef

Browse files
committed
In fletcher32's if output buffer, slice from input
1 parent 2dd1cdf commit b7bb7ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

numcodecs/fletcher32.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,6 @@ class Fletcher32(Codec):
103103
out_mv = ensure_contiguous_ndarray(out).view("uint8")
104104
out_ptr = &out_mv[0]
105105
memcpy(out_ptr, b_ptr, b_len - 4)
106-
return out
107-
return memoryview(b[:-4])
106+
else:
107+
out = b_mv[:-4]
108+
return out

0 commit comments

Comments
 (0)