[Numpy-discussion] unexpected behavior with allclose( scalar, empty array)
Charles R Harris
charlesr.harris@gmail....
Thu Jan 3 16:25:57 CST 2008
On Jan 3, 2008 2:37 PM, Matthew Brett <matthew.brett@gmail.com> wrote:
> Just to ask - is there a reason why this:
>
> > In [39]: all([])
> > Out[39]: True
>
> is the case?
Because it's True. Anything is true about the elements of an empty set,
because there aren't any. In this case, all asks if all elements in [] are
true, i.e., does x member [] -> x is true. Since x member [] is always
false, the implication is always true. Recall that the statement x -> y has
the same truth value as the statement x' or xy.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080103/f8ed8cf9/attachment-0001.html
More information about the Numpy-discussion
mailing list