Function argmin
Performs an argmin over the specified dimension.
Parameters
Name | Description |
---|---|
input | The operation to perform argmin on. |
axis | The diension the argmin should be performed over. |
Returns
The new argmin operation.
Example
import dopt .core : evaluate;
auto a = float32([5], [4.0f, 2.0f, 6.0f, 1.0f, 2.0f]) .argmin(0);
auto b = float32([2, 3], [
5.0f, 1.0f, 3.0f,
6.0f, 7.0f, 2.0f
]) .argmin(1);
assert(a .evaluate() .as!int == [3]);
assert(b .evaluate() .as!int == [1, 2]);