Which function is used to find the indices of the maximum and minimum elements of an array in NumPy?
Correct answer
A. np.argmax() and np.argmin()
20 views
A. np.argmax() and np.argmin()
20 views
The np.argmax() and np.argmin() functions return the indices of the maximum and minimum elements of an array, respectively. They are useful for locating the positions of extreme values within arrays.
Not sure why the answer is A? Ask here and get an explanation.