[Numpy-discussion] Re: weird interaction: pickle, numpy, matplotlib.histHi
a.u.r.e.l.i.a.n at gmx.net
Thu Apr 6 04:16:11 CDT 2006
> > But, this brings up the point that currently the pickled raw-data which
> > is read-in as a string by Python is used as the memory for the new array
> > (i.e. the string memory is "stolen"). This should work. The fact
> > that it didn't with sort was a bug that is now fixed in SVN. However,
> > operations on out-of-byte-order arrays will always be slower. Thus,
> > perhaps on pickle read the data should be copied to native byte-order if
> > necessary.
> Yes, I think that converting directly to native byteorder in
> unpickling time would be the best.
If you stored your data in wrong byte order for some odd reason (maybe you use
a library that requires a certain byte order), then you would want pickle to
deliver the data back exactly as stored. I think this should be made a user
option in some way, although I do not know a good place for it right now.
More information about the Numpy-discussion