Eryk Sun added the comment: NumPy is not part of Python's standard library, so this is a 3rd party problem. However, please don't waste the time of the NumPy developers with this. You either haven't read the documentation or have misread it. numpy.all [1] is an AND reduction over the specified dimension or all dimensions of an array.
>>> import numpy as np >>> A = np.random.random((10, 1)) >>> np.all(A) True >>> True < 1 False >>> isinstance(True, int) True >>> int(True) 1 The following checks whether all values are less than 1: >>> A < 1 array([[ True], [ True], [ True], [ True], [ True], [ True], [ True], [ True], [ True], [ True]], dtype=bool) >>> np.all(A < 1) True [1]: http://docs.scipy.org/doc/numpy/reference/generated/numpy.all.html ---------- nosy: +eryksun resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26596> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com