Skip to content

Commit d0a7721

Browse files
committed
Use _mv subscript name for typed-memoryivews
1 parent f91c283 commit d0a7721

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

numcodecs/fletcher32.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ class Fletcher32(Codec):
6363
def encode(self, buf):
6464
"""Return buffer plus 4-byte fletcher checksum"""
6565
buf = ensure_contiguous_ndarray(buf).ravel().view('uint8')
66-
cdef const uint8_t[::1] b_ptr = buf
67-
val = _fletcher32(b_ptr)
66+
cdef const uint8_t[::1] b_mv = buf
67+
val = _fletcher32(b_mv)
6868
return buf.tobytes() + struct.pack("<I", val)
6969

7070
def decode(self, buf, out=None):
7171
"""Check fletcher checksum, and return buffer without it"""
7272
b = ensure_contiguous_ndarray(buf).view('uint8')
73-
cdef const uint8_t[::1] b_ptr = b[:-4]
74-
val = _fletcher32(b_ptr)
73+
cdef const uint8_t[::1] b_mv = b[:-4]
74+
val = _fletcher32(b_mv)
7575
found = b[-4:].view("<u4")[0]
7676
if val != found:
7777
raise RuntimeError(

0 commit comments

Comments
 (0)