[Numpy-discussion] Is this odd?

Alan G Isaac aisaac at american.edu
Fri Apr 2 09:38:44 EDT 2010


On 4/2/2010 8:29 AM, Nadav Horesh wrote:
> In python empty sequences are always equivalent to False, and non-empty to True.



I think that was why the OP objected to this behavior:

         >>> bool(np.array([0]))
         False

Alan Isaac



More information about the NumPy-Discussion mailing list