[SciPy-dev] pickling problem
Darren Dale
dd55 at cornell.edu
Wed Nov 30 15:34:57 EST 2005
On Wednesday 30 November 2005 03:12 pm, Travis Oliphant wrote:
> Darren Dale wrote:
> >I'm having some trouble with unpickled scipy arrays. The issue shows up
> > when I try to plot in matplotlib, but I think it is a scipy problem.
>
> Can you reproduce the problem just using Numeric and scipy and pickle?
I just ran the same script again with Numeric, and was not able to reproduce
the problem.
> What version of Numeric are you using?
24.2
> This looks like an array protocol issue. But, for me, not using pylab,
> I can create the scipy array, pickle it, unpickle it and convert it to a
> Numeric array just fine.
The following gives me the same error:
import pickle
import scipy
import Numeric
a = scipy.arange(10)
pickle.dump(a,file('temp.p','w'))
b = pickle.load(file('temp.p'))
c = Numeric.array(b)
Traceback (most recent call last):
File "pickletest.py", line 8, in ?
c = Numeric.array(b)
ValueError: cannot handle misaligned or not writeable arrays.
I have an up-to-date scipy, (every day I update svn, rm -Rf build, rm -R
site-packages/scipy, and install from scratch)
In [4]: scipy.base.__version__
Out[4]: '0.7.4.1544'
In [5]: scipy.__scipy_version__
Out[5]: '0.4.2_1466'
Darren
More information about the SciPy-Dev
mailing list