Binary pickle portability

Greg Ewing greg.ewing at compaq.com
Sun Jul 4 16:33:22 EDT 1999


Olaf Delgado wrote:
> 
> After looking a bit closer, I found that the problem is probably related
> to the Numeric module (i.e., pickling matrices) and doesn't depend on
> whether binary or ordinary mode is used.

I think you may have been right the first time.
The Numeric module always seems to pickle its 
matrices in a binary format, whichever pickler
is used. I suspect it's just dumping whatever
is in memory, so as you say, it's non-portable.

If you want a portable format, you may have to
convert the Numeric matrices to standard Python
lists or tuples before pickling.

Greg




More information about the Python-list mailing list