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

Returns minimum values along one axis.

Parameters
ParameterDescription
axisAxis to reduce on any rank; negative axes count from the end.
keepDimsRetain reduced dimensions with length one.
resultOptional non-aliased destination of the exact output shape.
whereOptional flat Boolean selection mask.
ignoreNaNSkip NaNs; otherwise preserve this operation's default NaN contract.
Returns

A 1D array containing the minimum values.

Throws
  • IndexException if the axis does not exist.
  • ValueException if the array is empty or its numeric type is not ordered.
  • IndexException for an invalid axis.
  • ValueException for invalid mask/destination or no observations (except sum).
Example
import klyn.math

a = NDArray<Int>([[3, 2], [1, 4]])
print(a.min(axis=0))  # [1, 2]