pymc.math.minimum#

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

elemwise minimum. See min for the minimum in one tensor

Computes element-wise minimum of two tensors.

Parameters:
xTensorLike

First input tensor

yTensorLike

Second input tensor

Returns:
TensorLike

Output tensor with the minimum of corresponding elements in x and y

Examples

>>> import pytensor
>>> import pytensor.tensor as pt
>>> a = pt.vector("a")
>>> b = pt.vector("b")
>>> f = pytensor.function([a, b], pt.minimum(a, b))
>>> f([1, 3, 5], [2, 3, 4])
array([1, 3, 4])