Skip to content

Commit 9d35e68

Browse files
committed
fix(serialization): Slice 1-D multibyte data as bytes for pwrite
1 parent 61bab18 commit 9d35e68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorizer/serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3510,7 +3510,7 @@ def _mv_suffix(data: "collections.abc.Buffer", start: int):
35103510
if not isinstance(data, memoryview):
35113511
data = memoryview(data)
35123512
try:
3513-
if data.ndim != 1:
3513+
if data.ndim != 1 or data.format != "B":
35143514
data = data.cast("B")
35153515
return data[start:]
35163516
finally:

0 commit comments

Comments
 (0)