[Numpy-discussion] Preserving NumPy views when pickling
robert.kern at gmail.com
Tue Oct 25 20:29:54 EDT 2016
On Tue, Oct 25, 2016 at 5:09 PM, Matthew Harrigan <
harrigan.matthew at gmail.com> wrote:
> It seems pickle keeps track of references for basic python types.
> x = 
> y = [x]
> x,y = pickle.loads(pickle.dumps((x,y)))
> >>> [[1,2]]
> Numpy arrays are different but references are forgotten after
pickle/unpickle. Shared objects do not remain shared. Based on the quote
below it could be considered bug with numpy/pickle.
Not a bug, but an explicit design decision on numpy's part.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion