ivy.maximum(x, y, f=None)[source]

Returns the max of x and y (i.e. x > y ? x : y) element-wise.

  • x (array) – Input array containing elements to maximum threshold.

  • y (array) – Tensor containing maximum values, must be broadcastable to x.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


An array with the elements of x, but clipped to not be lower than the y values.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty