mlx.core.minmax

Contents

mlx.core.minmax#

minmax(a: array, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream: StreamOrDevice = None) → tuple[array, array]#

Return the minimum and maximum over the given axes.

Equivalent to calling min() and max() separately.

Parameters:
  • a (array) – Input array.

  • axis (int or list(int), optional) – Axis or axes to reduce over. If unspecified, reduce over the entire array.

  • keepdims (bool, optional) – Keep reduced axes as singleton dimensions. Default: False.

Returns:

The minimum and maximum arrays, in that order.

Return type:

tuple(array, array)