pymc.math.lt#

pymc.math.lt = Elemwise(scalar_op=LT,inplace_pattern=<frozendict {}>)[source]#

a < b

Computes element-wise less than comparison between two tensors.

Parameters:
aTensorLike

First input tensor

bTensorLike

Second input tensor

Returns:
TensorVariable

Output tensor of type bool, with 1 (True) where a < b, and 0 (False) elsewhere.

Examples

>>> import pytensor
>>> import pytensor.tensor as pt
>>> x = pt.vector("x")
>>> y = pt.vector("y")
>>> f = pytensor.function([x, y], pt.lt(x, y))
>>> f([1, 2, 3], [2, 2, 2])
array([ True, False, False])