Given the array, I need to find the minimum and minimum position. This can be done using
>>> current_cost array([ 2.54802261, 2.98627555, 0.23873749, 1.82511195, 1.35469083]) >>> current_cost.min() 0.23873748917821858 >>> current_cost.argmin() 2
This solution is not very effective because it needs to double check the list. Is there a way to get minimum and agrmin at the same time?
source share