cf.Field.any

Field.any()[source]

Return True if 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.

See also

all

Examples 1:
>>> b = f.any()
Returns:
out : bool

Whether ot not any data array elements evaluate to True.

Examples 2:
>>> print f.array
[[0 0 0]]
>>> f.any()
False
>>> print f.array
[[-- 0 0]]
>>> d.any()
False
>>> print f.array
[[-- 3 0]]
>>> f.any()
True

Previous topic

cf.Field.all

Next topic

cf.Field.allclose

This Page