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
Re: [Numpy-discussion] pickling arrays: numpy 1.0 can't unpickle numpy 1.0.1
by Travis Oliphant other posts by this author
Dec 7 2006 4:46PM messages near this date
Re: [Numpy-discussion] pickling arrays: numpy 1.0 can't unpickle numpy 1.0.1 | Re: [Numpy-discussion] pickling arrays: numpy 1.0 can't unpickle numpy 1.0.1
Emanuele Olivetti wrote:
>  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_
build
>       setstate(state)
>  TypeError: argument 1 must be sequence of length 5, not 8
>  -----------------

Please show which version of numpy you are using.   There were no 
changes to pickle from released numpy 1.0 to 1.0.1  (at least that I'm 
aware of).

There might, however, be bugs.

-Travis

_______________________________________________
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