fn
isneginf
→Tensorisneginf(x: Tensor)Element-wise test for negative infinity.
Identifies entries that are exactly in the IEEE 754
floating-point sense. Finite values and both report
False.
Parameters
xTensorFloating-point input tensor.
Returns
TensorBoolean tensor of the same shape as x.
Notes
Defined as the conjunction of "is infinite" and "is negative":
NaN inputs report False because NaN compares false against any
real value, including in isinf.
Examples
>>> import lucid
>>> import math
>>> x = lucid.tensor([-math.inf, -1.0, 0.0, math.inf])
>>> lucid.isneginf(x)
Tensor([ True, False, False, False])