I would like to find the N biggest elements and their arguments in a numpy array.
I use partitions that i found but i cant get the 5 biggest in element in an numpy array. Here is an example:
a =[ 0.409, 0.355, -0.403, 0.307, -0.826, -0.66, -1.582, -0.112, -0.244, -0.954]
z = bn.argpartition(-a, 5)[:5]
z = apodosi.argsort()[-5:]
z = heapq.nlargest(5, a)
I get back the array a while I would like to get 0,1,3,5,7 as arguments and if possible their values. I am still new in programming!