Find the indices of the maximum value of array using NumPy

In this python numpy program, we will find the indices of the maximum value of array using NumPy.

Steps to solve the program
  1. Import the numpy library as np.
  2. Create an array using np.array().
  3. Find the indices of the maximum value of the array using np.argmax().
  4. Print the output
				
					import numpy as np
x = np.array([76,36,56,90])

print("Index of maximum Values: ",np.argmax(x))
				
			

Output :

				
					Index of maximum Values:  3
				
			

find the union of two arrays.

find the indices of the minimum value of an array.

Leave a Comment