[SciPy-user] rescuing old pickled numpy arrays
David M. Cooke
cookedm at physics.mcmaster.ca
Mon Jun 19 16:03:34 EDT 2006
On Mon, Jun 19, 2006 at 02:51:36PM +0100, Cory Davis wrote:
> Hi All,
> this relates to a question I raised a few weeks ago about pickled arrays
> from older Numpy versions not loading. Here is what happens when I try
> to load my old data ...
>
> ---> 51 return cPickle.load(infile)
>
> AttributeError: 'module' object has no attribute 'dtypedescr'
>
> Can anyone suggest an easy way to rescue this data?
The easy way I suppose would be to inject a 'dtypedescr' into the
appropiate module.
Have a look at the pickletools module. pickletools.dis() will
disassemble the pickle, so you could figure out what it's looking for.
At worst, you could use pickletools.genops() to pull out the data.
Can you send me a copy of a pickle? I may be able to cook up an upgrade
routine.
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca
More information about the SciPy-User
mailing list