Home python How does the Argmax function in NUMPY work in the presence of...

How does the Argmax function in NUMPY work in the presence of an Axis?

Author

Date

Category

I ask more experienced comrades to explain this behavior of the function.


Answer 1, Authority 100%

by default searches for the maximum element index (in the plane), that is, roughly speaking, as if you are just [10, 11, 12, 13, 14, 15] np.argmax (a) and displays this index 5.
When the Axis parameter is specified, it is searched for a (0-x, 1-y) coordinate axes (0-x, 1-y) .
By X you have three meanings, so it has brought the indexes of maximum elements relative to each X (there are 3). Regarding Y them 2.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions