From: Mike E. <mik...@gm...> - 2005-04-26 20:18:39
|
Bingo! One upgrade to the latest numarray and everything works fine. Many thanks for your help. Mike. On 4/25/05, Jeff Whitaker <js...@fa...> wrote: > Mike Elson wrote: >=20 > >Hello Jeff, > > > >I tried loading the file etopo20.pickle by itself but got the same error= : > > > >import cPickle > >a =3D cPickle.load(open('etopo20.pickle','rb')) > > > >Traceback (most recent call last): > > File "<stdin>", line 1, in ? > > File "/usr/lib/python2.3/site-packages/numarray/generic.py", line > >159, in Cla\ssicUnpickler > > self.__setstate__(state) > > File "/usr/lib/python2.3/site-packages/numarray/numarraycore.py", > >line 463, i\n __setstate__ > > self._type =3D state["_type"] > >AttributeError: ("'str' object has no attribute 'name'", <function > >ClassicUnpic\kler at 0xb71e48b4>, (<class > >'numarray.numarraycore.NumArray'>, {'_type': 'Floa\t32', '_itemsize': > >4, '_shape': (1081,), '_bytestride': 4, '_byteoffset': 0, '_\version': > >'1.1', '_byteorder': 'big', '_data': <memory at 082ee9a0 with > >size:43\24 held by object 082ee980 aliasing object 00000000>, > >'_strides': (4,)})) > > > >Looking at etopo20.pickle itself, the 4th line reads > >'cnumarray.generic' - I'm guessing that means it is stored using > >numarray. > >Do I need a specific version of python or numarray to read it? I have > >both Numeric (23.1) and numarray installed already. > > > >Mike. > > > > > > > Mike: Not that I know of. I'm puzzled by this one. You said in your > first message that you are using numarray 0.8 - I think that might be > too old. It's up to 1.3.1 now, and I'm sure I created that pickle with > at least 1.1. >=20 > -Jeff >=20 > -- > Jeffrey S. Whitaker Phone : (303)497-6313 > Meteorologist FAX : (303)497-6449 > NOAA/OAR/CDC R/CDC1 Email : Jef...@no... > 325 Broadway Office : Skaggs Research Cntr 1D-124 > Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg >=20 > |