numarray + cPickle problem

Bill Mill bill.mill at gmail.com
Sat Nov 13 01:16:29 EST 2004


Hello all,

I've pickled a numarray array object using cPickle like so:

pickle = cPickle.Pickler(fout, -1)
pickle.dump((myarray, list1, list2))

and this seems to work fine, until I try to load the array back into
memory:

up = cPickle.Unpickler(fin)
myarray, list1, list2 = up.load()

which causes an odd traceback:

Traceback (most recent call last):
File "do_lsi.py", line 7, in ?
data, artists, users = up.load()
ImportError: No module named generic

To which I say, huh? There is indeed a numarray.generic module - but
numarray is already included into this file. I tried including
numarray.generic, or "from numarray import generic" or "from
numarray.generic import *", but none of those did anything.

Anybody able to guess what is happeneing here? Anybody that can explain
the unpickling process in greater detail for me so that I may
understand it better?

Peace
Bill Mill
bill.mill at gmail.com




More information about the Python-list mailing list