[Numpy-discussion] Fwd: Pull request #3188 - Void scalar pickling behavior.

Alex Ford fordas at uw.edu
Sat Apr 6 15:03:54 EDT 2013


Hello,

Do any core developers or uses have guidance on how to resolve PR #3188 (
https://github.com/numpy/numpy/pull/3188) in relation to the pickling
behavior of array scalar objects?

To summarize, pickling array scalars with object fields, which are produced
when indexing record arrays with object fields, stores the object address
instead of pickling the referenced object. This behavior, obviously,
results in invalid references on unpickling.

Two current options are to:
A) Raise an exception on pickling scalars with object fields.
B) Transparently convert scalars to zero-rank arrays on pickling, which
pickle properly.

Unless there are objections or opinions on potential solutions, I am
inclined to implement A.

Thanks,
Alex Ford
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130406/8d918662/attachment.html>


More information about the NumPy-Discussion mailing list