klyn.math.NDArray.max
method
public max(ignoreNaN as Boolean = false, where as Boolean[] = null) as Object
Description

Returns the maximum value of the array.

Parameters
ParameterDescription
ignoreNaNSkip NaNs; otherwise retain the existing first-value comparison contract.
whereOptional flat Boolean mask, one entry per input element.
Returns

The first element having the maximum value.

Throws
  • ValueException if the array is empty or its numeric type is not ordered.
Example
a = NDArray<Int>([3, 1, 4])
print(a.max())  # 4