nimble.match.anyInfinity

nimble.match.anyInfinity(data)

Determine if any values in the data are infinity.

Return True if one or more value in the data is a positive or negative infinity float value.

Parameters:

data (Nimble Base object)

Returns:

bool

See also

allInfinity, infinity

Examples

>>> lst = [[0, -1.0, float('inf')],
...        [1, -2.0, 0],
...        [2, -3.0, 0]]
>>> X = nimble.data(lst)
>>> anyInfinity(X)
True
>>> lst = [[0, -1.0, 'infinity'],
...        [1, -2.0, 'zero'],
...        [2, -3.0, 'one']]
>>> X = nimble.data(lst)
>>> anyInfinity(X)
False