Solved: argmax() method from numpy is returning only first maximum, How to find indexes of all maximum?


I have below code
This returns only 0. I was expecting that will return all indices where maximum occur i.e. 0 & 1
Is there any way to achieve this?

Best Answer:

You can use numpy.where to find all indexes of the max value of the array.

If you have better answer, please add a comment about this, thank you!