public argMax(axis as Long, keepDims as Boolean = false, ignoreNaN as Boolean = false, where as Boolean[] = null, result as NDArray<Long> = null) as NDArray<Long>
Returns the indices of the maximum values along one axis.
| Parameter | Description |
|---|---|
axis | Axis to reduce on any rank; negative axes count from the end. |
keepDims | Retain reduced dimensions with length one. |
result | Optional non-aliased destination of the exact output shape. |
where | Optional flat Boolean selection mask. |
ignoreNaN | Skip NaNs; otherwise preserve this operation's default NaN contract. |
A 1D array containing the first zero-based index of each maximum value.
import klyn.math a = NDArray<Int>([[3, 2], [1, 4]]) print(a.argMax(axis=1)) # [0, 1]