From: Travis O. <oli...@ie...> - 2006-10-27 17:48:07
|
Joris De Ridder wrote: > Hi, > > The following did once work in NumPy: > > >>>> dtype([int16]) >>>> dtype([[int16]]) >>>> dtype([uint,int32]) >>>> dtype(['f8','S10']) >>>> > > but now they all generate a "TypeError: data type not understood". Why? > I could not find the answer in help(dtype), the RecordArrays tutorial on > scipy.org, the NumPy release notes, nor in the NumPy book. > It's in the release notes. Look in the section from 1.0b2 to 1.0b3. It's highlighted with a Note: *NOTE: * When creating data-type objects from lists, the list must be in array descriptor format. The "list of data-type objects" approach is no longer supported due to its ambiguity with the very common array descriptor approach. You can still get this behavior using a comma-separated string or changing your list to an array_descriptor: [('', x) for x in oldlist] -Travis |