mlx.core.cummin#

cummin(a: array, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, stream: None | Stream | Device = None) array#

Return the cumulative minimum of the elements along the given axis.

Parameters:
  • a (array) – Input array

  • axis (int, optional) – Optional axis to compute the cumulative minimum over. If unspecified the cumulative minimum of the flattened array is returned.

  • reverse (bool) – Perform the cumulative minimum in reverse.

  • inclusive (bool) – The i-th element of the output includes the i-th element of the input.

Returns:

The output array.

Return type:

array