With the help of
Numpy matrix.argmax() method, we are able to find the sort the elements in the given matrix having one or more dimension and it would return the index value of sorted elements.
Return : Return index number of sorted elements in matrix
Example #1 :
In this example we can see that with the help of
matrix.argsort() method, we are able to find the sorted element in a given matrix and gives output as index of sorted array.
[[3 1 0 2]]
Example #2 :
[[0 1 2] [1 0 2] [1 0 2]]
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.