nimble.match.anyTrue

nimble.match.anyTrue(data)

Determine if any values in the data are a boolean True.

Return True if one or more value in the data is boolean True.

Parameters:

data (Nimble Base object)

Returns:

bool

See also

allTrue, true

Examples

>>> lst = [[0, -1.0, True],
...        [1, -2.0, False],
...        [2, -3.0, False]]
>>> X = nimble.data(lst)
>>> anyTrue(X)
True
>>> lst = [[0, -1.0, False],
...        [1, -2.0, False],
...        [2, -3.0, False]]
>>> X = nimble.data(lst)
>>> anyTrue(X) # Note: 1 is not boolean type
False