Skip to content

Commit

Permalink
Support latest numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Jun 30, 2024
1 parent 8623e53 commit e6c8c51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/msglc/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _child(self, toc: dict | int):
# {"p": [start_pos, end_pos]}
# this is used in small objects
if 2 == len(child_pos := toc["p"]) and all(isinstance(x, int) for x in child_pos):
if isinstance(data := self._read(*child_pos), bytes) and b"numpy.core.multiarray" in data[:40]:
if isinstance(data := self._read(*child_pos), bytes) and b"multiarray" in data[:40]:
return pickle.loads(data)
return data

Expand Down

0 comments on commit e6c8c51

Please sign in to comment.