jax.numpy.minimumΒΆ

jax.numpy.minimum(x1, x2)ΒΆ

Element-wise minimum of array elements.

LAX-backend implementation of minimum().

Original docstring below.

Compare two arrays and returns a new array containing the element-wise minima. If one of the elements being compared is a NaN, then that element is returned. If both elements are NaNs then the first is returned. The latter distinction is important for complex NaNs, which are defined as at least one of the real or imaginary parts being a NaN. The net effect is that NaNs are propagated.

Parameters
  • x1 (array_like) – The arrays holding the elements to be compared. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).

  • x2 (array_like) – The arrays holding the elements to be compared. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).

Returns

y – The minimum of x1 and x2, element-wise. This is a scalar if both x1 and x2 are scalars.

Return type

ndarray or scalar