[Numpy-discussion] defmatrix move and unpickling of old data

David Reichert d.p.reichert@sms.ed.ac...
Mon Apr 5 11:30:44 CDT 2010


Hi,

Just to let you know, I now fixed the problem using:

import sys
import numpy
sys.modules['numpy.core.defmatrix'] = numpy.matrixlib.defmatrix


The key is that the statement "import numpy.core.defmatrix" needs to work
for unpickling to succeed, and just renaming things isn't enough.

Cheers


David

On Sat, Apr 3, 2010 at 8:13 PM, David Reichert <d.p.reichert@sms.ed.ac.uk>wrote:

> Hi,
>
> After some work I got an optimized numpy compiled on a machine where I
> don't
> have root access, but I had to use numpy 1.4.0 to make it work. Now I have
> the problem that I cannot seem to unpickle data I had created using numpy
> 1.3,
> getting an ImportError about defmatrix not being found.
>
> I understand defmatrix was moved from core to matrixlib? Is there some
> workaround
> I could use? I might have to move my data in between machines with either
> versions of
> numpy installed in the future as well... I already tried some renaming
> tricks but to
> no avail.
>
> Thanks
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100405/4cf1b9ac/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100405/4cf1b9ac/attachment.pl 


More information about the NumPy-Discussion mailing list