fn
isposinf
→Tensorisposinf(x: Tensor)Element-wise test for positive 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 positive":
NaN inputs report False.
Examples
>>> import lucid
>>> import math
>>> x = lucid.tensor([-math.inf, -1.0, 0.0, math.inf])
>>> lucid.isposinf(x)
Tensor([False, False, False, True])