Answers for "numpy array index of max"

2

max of matrix numpy

# Get the maximum element from a Numpy array
maxElement = numpy.amax(arr)
 
print('Max element from Numpy Array : ', maxElement)
Posted by: Guest on May-11-2020
0

numpy get index of n largest values

numbers = np.array([1, 3, 2, 4])
n = 2
indices = (-numbers).argsort()[:n]
Posted by: Guest on March-05-2021
-1

numpy get max index

>>> a.argmax(axis=0)

array([1, 1, 0])
Posted by: Guest on April-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language