Skip to content

Commit

Permalink
do not use pickle to ensure interop between different python versions;
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesrichter committed Jun 26, 2023
1 parent c6f3898 commit 6e8fc11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions koi_core/data/simple_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
@cache
def get_np(self: Union[SampleDatum, SampleLabel], meta) -> np.ndarray:
f = BytesIO(self.raw)
return np.load(f), meta
return np.load(f, allow_pickle=False), meta


def set_np(self: Union[SampleDatum, SampleLabel], value: np.ndarray) -> None:
f = BytesIO()
np.save(f, value)
np.save(f, value, allow_pickle=False)
self.raw = f.getvalue()
setCache(self, 'np', None)

Expand Down

0 comments on commit 6e8fc11

Please sign in to comment.