[Numpy-discussion] numpy all unexpected result (generator)

Alan G Isaac alan.isaac@gmail....
Tue Jan 31 09:48:05 CST 2012


On 1/31/2012 10:35 AM, Benjamin Root wrote:
> A generator is an input that could be converted into an array.


def mygen():
   i = 0
   while True:
     yield i
     i += 1

Alan Isaac



More information about the NumPy-Discussion mailing list