-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
breakingThis change will break codeThis change will break codesearch & findThe find* family of functionsThe find* family of functions
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
| argmin(f, domain) = findmin(f, domain)[2] |
We should have argmin/argmax to return index instead.
ShuhuaGao, pdeffebach, Arkoniak, dataopt, SEMSOFT and 6 moreJeffBezanson, zsunberg and lassepe
Metadata
Metadata
Assignees
Labels
breakingThis change will break codeThis change will break codesearch & findThe find* family of functionsThe find* family of functions