[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
|