[Numpy-discussion] arrays and iterators.

Tim Hochberg tim.hochberg at cox.net
Mon Mar 27 14:54:02 CST 2006


Lest everybody think that I'm only about ripping things out, let me 
propose adding a feature. Well, sort of. I propose that we make:

    array(someiterator)

an value error for right now instead of returning a rank-0 object array. 
Then, in Python 2.5, we can use the _length_hint protocol to efficiently 
create arrays from iterator objects without any extra copying. The exact 
details don't need to be worked out right now, after all we're all too 
tied up with reshape, but I'd like to reserve that syntax for that purpose.

Regards,

-tim





More information about the Numpy-discussion mailing list