pangolin.interface.Interface.maximum#
- Interface.maximum(a, b)[source]#
Create an RV by applying
pangolin.ir.Maximumto its parents.All arguments must either be scalar or mutually broadcastable according to the broadcasting policy selected when constructing the interface or within an overload block.
- Parameters:
- Returns:
ir.RV – RV whose operation is
pangolin.ir.Maximumwhen all parents are scalar, or one or more nestedpangolin.ir.VMapoperations around that type when broadcasting is required. The operation has 2 parents.- Return type:
Examples
>>> pi = Interface() >>> x = pi.maximum(0.1, 0.2) >>> x RV(Maximum(), RV(Constant(0.1)), RV(Constant(0.2))) >>> x.shape () >>> y = pi.maximum([0.1, 0.1], 0.2) >>> y RV(VMap(Maximum(), [0, None], 2), RV(Constant([0.1,0.1])), RV(Constant(0.2))) >>> y.shape (2,)
Notes
Returns the larger of the two values. If either value is NaN, the result is NaN.
See also