Returns True if all elements evaluate to True.
Parameters: | a : array_like
axis : int, optional
out : ndarray, optional
|
---|---|
Returns: | out : ndarray, bool
|
See also
Notes
Since NaN is not equal to zero, NaN evaluates to True.
Examples
>>> np.all([[True,False],[True,True]])
False
>>> np.all([[True,False],[True,True]], axis=0)
array([ True, False], dtype=bool)
>>> np.all([-1, 4, 5])
True
>>> np.all([1.0, np.nan])
True