[issue26596] numpy.all np.all .all
Steven D'Aprano
report at bugs.python.org
Sun Mar 20 20:10:41 EDT 2016
Steven D'Aprano added the comment:
This is not a bug, but behaving correctly. You have:
py> A = np.random.random((10,1))
py> np.all(A)
True
py> np.all(A) < 1 # is True less than 1?
False
which is correct: True is *not* less than 1. But True *is* less than 2:
py> True < 2
True
py> np.all(2*A)
True
Also, for future reference, please do not post screen shoots unless you absolutely have to. Screenshots make it impossible to copy the code from your example, and make it difficult for anyone who is visually impaired and using a screen-reader to contribute. Instead, copy and paste the text from your interpreter. Thank you.
----------
nosy: +steven.daprano
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26596>
_______________________________________
More information about the Python-bugs-list
mailing list