nimble.match.allInfinity

nimble.match.allInfinity(data)

Determine if all values in the data are infinity.

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

Parameters:

data (Nimble Base object)

Returns:

bool

See also

anyInfinity, infinity

Examples

>>> lst = [[float('inf'), float('inf'), float('inf')],
...        [float('inf'), float('inf'), float('inf')],
...        [float('inf'), float('inf'), float('inf')]]
>>> X = nimble.data(lst)
>>> allInfinity(X)
True
>>> lst = [[float('inf'), float('inf'), float('inf')],
...        [float('inf'), 0, float('inf')],
...        [float('inf'), float('inf'), float('inf')]]
>>> X = nimble.data(lst)
>>> allInfinity(X)
False