Implementing kernel
C++ engine symbols that back this Python API.Element-wise maximum with broadcasting.
Returns the larger of the two operands at each position. NaN propagates: if either entry is NaN the result is NaN.
Parameters
Returns
TensorElement-wise result with shape broadcast(input.shape, other.shape) and
dtype determined by the usual type-promotion rules.
Notes
Mathematical definition:
Gradient flows to whichever operand achieves the maximum; ties are split arbitrarily.
Examples
>>> import lucid
>>> a = lucid.tensor([1.0, 2.0, 3.0])
>>> b = lucid.tensor([4.0, 5.0, 6.0])
>>> lucid.maximum(a, b)
Tensor([...])