This is an archival dump of old wiki content --- see scipy.org for current material

Abstract

If all elements are true in the given array, True is returned.

Signature


Function

all(arr)

Method

arr.all()


Returns

return
A boolean (True|False).

Arguments

arr
One of:

Details

xxx

Examples

   1 >>> from numpy import *
   2 >>> a = array([True, False, True])
   3 >>> a.all()                              # if all elements of a are True: return True; otherwise False
   4 False
   5 >>> all(a)                              # this form also exists
   6 False
   7 >>> a = array([1,2,3])
   8 >>> all(a > 0)                         # equivalent to (a > 0).all()
   9 True

Notes

xxx

See Also

any alltrue sometrue

SciPy: all (last edited 2015-10-24 17:48:24 by anonymous)