Hi,

I must say,  I agree with the other posters here, that it is not
completely obvious to me that:

a = np.array([True, False])
bool(a)

should return False.   Especially given:

L  = [True, False]
bool(L)

returns True.

Given that it's not completely obvious, and

a.all()

is completely obvious, and readable, the current behavior seems right
to me...  Otherwise someone somewhere is going to assume that bool(a)
does the same as a.any(), and run into problems.   Explicit is better
than implicit...

Best,

Matthew
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to