Skip to content

Commit

Permalink
fix(serialization): Slice 1-D multibyte data as bytes for pwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Eta0 committed Nov 25, 2024
1 parent 9d30c2a commit 3b4d049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorizer/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,7 @@ def _mv_suffix(data: "collections.abc.Buffer", start: int):
if not isinstance(data, memoryview):
data = memoryview(data)
try:
if data.ndim != 1:
if data.ndim != 1 or data.format != "B":
data = data.cast("B")
return data[start:]
finally:
Expand Down

0 comments on commit 3b4d049

Please sign in to comment.