public argMax(ignoreNaN as Boolean = false, where as Boolean[] = null) as Long
Returns the flat index of the maximum element.
| Parameter | Description |
|---|---|
ignoreNaN | Skip NaNs; otherwise retain the existing first-value comparison contract. |
where | Optional flat Boolean mask, one entry per input element. |
Zero-based row-major index.
import klyn.math a = NDArray<Int>([[7, 3], [4, 9]]) print(a.argMax()) # 3