Closed
Description
argmin(collection)
will return the index of the smallest element in the collection, however, with the newly added:
argmin(f, collection)
it returns the value of the minimal element (with evaluation) instead:
julia> argmin([1,2,-3,5])
3
julia> argmin(identity, [1,2,-3,5])
-3
And this is not even useful since it's just taking the second element from the returned value of findmin(f, collection)
:
Line 956 in 3d922e4
We should have argmin/argmax to return index instead.