Dan Goodman wrote: > 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? >
That's likely the problem. However, as of Python 2.5, there's a built in function that will do what you want. However, you would mask that builtin with the from numpy import *. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion