[Matrix-SIG] Numeric Pickling
Konrad Hinsen
hinsen@cnrs-orleans.fr
Fri, 25 Jun 1999 16:56:24 +0200
> The current (LNLL11) Numeric pickling mecanism
> seems broken: it does not handle anymore byte-ordering
> issues.
I am quite certain that this works for me. I have used pickle files
containing array data on various architectures and I never had
problems. The last such massive data movements I did was last
weeks, using LLNL11 on all machines involved.
> The problem is that there is currently no information in the
> pickle file about byte-ordering.
>
> I propose to change the pickling code (at the end of Numeric.py) to:
Ah, I see where the difference is. Apparently someone added support
for pickling with recent Python pickle versions to NumPy. Being a
NumPy veteran, I used (and still use) the subclassed pickler and
unpickler from Numeric. I didn't even know that the newer mechanism
had been implemented!
Anyway, the "old" pickle code works. So it seems we have two pickle
implementations, which don't use the same file format! And only one
of them works correctly.
Maybe this is a good time to work on a better implementation of array
pickling, supporting cPickle as well as pickle, and not causing the
tremendous memory overhead of calling tostring(). Plus of course reading
both earlier file formats for compatibility!
Konrad.
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron | Fax: +33-2.38.63.15.17
45071 Orleans Cedex 2 | Deutsch/Esperanto/English/
France | Nederlands/Francais
-------------------------------------------------------------------------------