[Numpy-discussion] record iteration (convert a 0-d array, iteration over non-sequence)

Travis Oliphant oliphant.travis at ieee.org
Fri Jun 23 22:07:45 CDT 2006


John Parejko wrote:
> Greetings!  I'm having trouble using records.  I'm not sure whether to 
> report this as a bug, but it certainly isn't a feature!  I would like to be 
> able to iterate over the individual rows in a record array, like so:
>   
That is probably reasonable, but as yet is unsupported.

You can do

x[0].item()

to get a tuple that can be iterated over.


-Travis





More information about the Numpy-discussion mailing list