Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #184 from scikit-hep/issue-169
Browse files Browse the repository at this point in the history
Make sure that classes generated on the fly are pickleable.
  • Loading branch information
jpivarski authored Aug 31, 2019
2 parents a9604bb + 5a3655a commit 1dc88a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions awkward/array/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def __setstate__(self, state):
self.__dict__.update(out.__dict__)
self.__class__ = out.__class__

def __reduce__(self):
state = {}
awkward.persist.serialize(self, state)
return (awkward.persist.deserialize, (state,))

def _checkiter(self):
if not self.allow_iter:
raise RuntimeError("awkward.array.base.AwkwardArray.allow_iter is False; refusing to iterate")
Expand Down
2 changes: 1 addition & 1 deletion awkward/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import re

__version__ = "0.12.7"
__version__ = "0.12.8"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit 1dc88a3

Please sign in to comment.