[Numpy-discussion] Bug in numpy all() function

Dan Goodman dg.numpy@thesamovar....
Wed Feb 6 06:11:28 CST 2008


Hi all,

I think this is a bug (I'm running Numpy 1.0.3.1):

>>> from numpy import *
>>> def f(x): return False

>>> all(f(x) for x in range(10))
True

I guess the all function doesn't know about generators?

Dan



More information about the Numpy-discussion mailing list