Python Practice › NumPy Programs › Program 58
Index of the maximum
Write a NumPy program to find the index of the maximum value.
Input
[76, 36, 56, 90]
Output
3
Approach
argmax.
Solution
import numpy as npprint(np.argmax([76, 36, 56, 90]))Output
3
Learn the concept
New to this topic? Read the lesson, then come back.