From: Travis O. <oli...@ie...> - 2006-05-22 07:47:55
|
Simon Burton wrote: > This is something I will need to be able do: > > >>>> a=numpy.array( [(1,2,3)], list('lll') ) >>>> >>>> a.astype( 'l' ) >>>> Currently record-arrays can't be cast like this to built-in types. it's true the error message could be more informative. What do you think should actually be done here anyway? How do you want to cast 3 long's to 1 long? You can use the .view method to view a record-array as a different data-type without going through a data-copy using tostring and fromstring. -Travis |