Skip to content

Commit 7d68d53

Browse files
committed
Use ensure_contiguous_memoryview with VLen
1 parent 7d593b8 commit 7d68d53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

numcodecs/vlen.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ from cpython.unicode cimport (
3030

3131
from numpy cimport ndarray
3232

33+
from .compat_ext cimport ensure_continguous_memoryview
3334
from ._utils cimport store_le32, load_le32
3435

3536
import numpy as np
@@ -416,7 +417,7 @@ class VLenArray(Codec):
416417
store_le32(<uint8_t*>data, l)
417418
data += 4
418419

419-
value_mv = memoryview(normed_values[i])
420+
value_mv = ensure_continguous_memoryview(normed_values[i])
420421
value_pb = PyMemoryView_GET_BUFFER(value_mv)
421422
encv = <const char*>value_pb.buf
422423

0 commit comments

Comments
 (0)