public argMax(axis as Int) as NDArray<UInt>:
Returns the indices of the maximum values along one axis.
| Parameter | Description |
|---|---|
axis | 0 for columns, 1 for rows on 2D arrays. |
A 1D array containing the first zero-based index of each maximum value.
import klyn.math a = NDArray<Int>.fromList([[3, 2], [1, 4]]) print(a.argMax(axis=1)) # [0, 1]