nimble.match.anyBoolean

nimble.match.anyBoolean(data)

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

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

Parameters:

data (Nimble Base object)

Returns:

bool

See also

allBoolean, boolean

Examples

>>> lst = [[0, -1.0, True],
...        [1, -2.0, False],
...        [2, -3.0, False]]
>>> X = nimble.data(lst)
>>> anyBoolean(X)
True
>>> lst = [[0, -1.0, 'a'],
...        [1, -2.0, 'b'],
...        [2, -3.0, 'c']]
>>> X = nimble.data(lst)
>>> anyBoolean(X) # Note: 0 and 1 are not boolean type
False