klyn.math.NDArray.argMax
method
public argMax(axes as IList<Long>, keepDims as Boolean = false, ignoreNaN as Boolean = false, where as Boolean[] = null, result as NDArray<Long> = null) as NDArray<Long>
Description

First extremum index in row-major order over the reduced axes.

Parameters
ParameterDescription
axesDistinct axes; negative axes count from the end.
keepDimsRetain reduced dimensions with length one.
ignoreNaNSkip NaNs; otherwise retain the existing first-value ordering contract.
whereOptional flat Boolean selection mask.
resultOptional non-aliased output of the expected shape.
Returns

Reduced Long tensor; indices flatten only the reduced axes.

Throws
  • IndexException for an invalid axis.
  • ValueException for invalid mask/destination, duplicate axes or no observations.
Example

values = data.argMax(axes=[0l, 2l])