pymc.math.gt#

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

a > b

Computes element-wise greater 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.gt(x, y))
>>> f([1, 2, 3], [0, 2, 4])
array([ True, False, False])