cf.Data.any¶
-
Data.
any
()[source]¶ Test whether any data array elements evaluate to True.
Performs a logical or over the data array and returns the result. Masked values are considered as False during computation.
Examples: >>> d = cf.Data([[0 0 0]]) >>> d.any() False >>> d[0, 0] = cf.masked >>> print d.array [[-- 0 0]] >>> d.any() False >>> d[0, 1] = 3 >>> print d.array [[0 3 0]] >>> d.any() True
>>> print d.array [[-- -- --]] >>> d.any() False