ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> numpy-discussion
numpy-discussion
[Numpy-discussion] pickling arrays: numpy 1.0 can't unpickle numpy 1.0.1
by Emanuele Olivetti other posts by this author
Dec 7 2006 2:30AM messages near this date
Re: [Numpy-discussion] equivalent to isempty command in matlab (newbie question), (Robert Kern) | Re: [Numpy-discussion] pickling arrays: numpy 1.0 can't unpickle numpy 1.0.1
I'm running numpy 1.0 and 1.0.1 on several hosts and
today I've found that pickling arrays in 1.0.1 generates
problems to 1.0. An example:
--- numpy 1.0.1 ---
import numpy
import pickle
a = numpy.array([1,2,3])
f=open('test1.pickle','w')
pickle.dump(a,f)
f.close()
---

If I unpickle test1.pickle in numpy 1.0 I got:
--- numpy 1.0
 > >> import numpy
 > >> import pickle
 > >> f=open('test1.pickle')
 > >> a=pickle.load(f)
Traceback (most recent call last):
   File "<stdin> ", line 1, in <module>
   File "/hardmnt/virgo0/sra/olivetti/myapps/lib/python2.5/pickle.py", line 1370, in load
     return Unpickler(file).load()
   File "/hardmnt/virgo0/sra/olivetti/myapps/lib/python2.5/pickle.py", line 858, in load
     dispatch[key](self)
   File "/hardmnt/virgo0/sra/olivetti/myapps/lib/python2.5/pickle.py", line 1217, in load_bu
ild
     setstate(state)
TypeError: argument 1 must be sequence of length 5, not 8
-----------------

How can I let access pickled arrays made in numpy 1.0.1 to numpy 1.0 ?
Help!

Thanks in advance,

Emanuele
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Thread:
Emanuele Olivetti
Travis E. Oliphant
Emanuele Olivetti
Travis Oliphant
Keith Goodman
Keith Goodman
Charles R Harris
emanuele

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved