Returns the index of the maximum value along a single axis. Ties are broken by returning the smallest index.
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 find the index of the maximum. Negative values count from the end, i.e.-1refers to the last axis.- drop
(
logical(1))
IfTRUE(default) the reduced axis is removed; ifFALSEit is kept with size 1.
Value
(arrayish)
Has the default integer data type (see default_dtypes()) regardless of
the input's, and the input's shape with axis removed (drop = TRUE) or
set to 1 (drop = FALSE).
StableHLO
Lowers to hlo_reduce(), specified under
reduce.
The reduction is variadic over (values, indices), with a
(value > value | (value == value & idx < idx)) selector.