pymc.math.le#

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

a <= b

Computes element-wise less than or equal 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.le(x, y))
>>> f([1, 2, 3], [2, 2, 2])
array([ True,  True, False])