Running minimum of array elements along a single axis along with
the index of the last occurrence of the running minimum.
At output position j, the values output is min(input[1:j]) and the
indices output is the largest i in 1:j with
input[i] == values[j] (last-occurrence tiebreak).
Arguments
- x
(
arrayish)
One input. Can be any data type. An R value materializes at its default data type.- axis
(
integer(1))
Axis along which to accumulate. Negative values count from the end, i.e.-1refers to the last axis.
Value
(named list of two arrayish)
Elements values, the running minimum at the input's data
type, and indices, the running argmin at the default
integer data type (see default_dtypes()). Both have the input's shape.
StableHLO
Lowers to hlo_reduce_window(), specified under
reduce_window.
The window is variadic over (values, iota), so the index of the running
extremum is carried alongside it.