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

>>> print d.array
[[0 0 0]]
>>> d.any()
False
>>> print d.array
[[-- 0 0]]
>>> d.any()
False
>>> print d.array
[[0 3 0]]
>>> d.any()
True

Previous topic

cf.Data.all

Next topic

cf.Data.binary_mask

This Page