mlx.core.maximum#

mlx.core.maximum(a: Union[scalar, array], b: Union[scalar, array], /, *, stream: Union[None, Stream, Device] = None) array#

Element-wise maximum.

Take the element-wise max of two arrays with numpy-style broadcasting semantics. Either or both input arrays can also be scalars.

Parameters:
  • a (array) – Input array or scalar.

  • b (array) – Input array or scalar.

Returns:

The max of a and b.

Return type:

array