argmin()
Returns the index of the minimum value of the flattened scalars.
Declaration
func argmin() -> MLTensorDiscussion
let x = MLTensor(shape: [3, 2], scalars: [2, 3, 4, 5, 6, 7], scalarType: Float.self)
let y = x.argmin()
y.shape // is []
y.scalarType // is Int32
await y.shapedArray(of: Int32.self) // is 0