klyn.math.NDArray.argmin
method
public argmin() as Int:
Description

Returns the flat index of the minimum element.

Returns

Zero-based row-major index.

Throws
  • ValueError if the array is empty.
Example
import klyn.math

a = NDArray<Int>.fromList([[7, 3], [4, 9]])
print(a.argmin())  # 1