title: How does numpy argmax work?
body: <p>So I know that the numpy argmax retrieves the maximum value along an axis. Thus,</p>
  
  <pre><code>x = np.array([[12,11,10,9],[16,15,14,13],[20,19,18,17]])
  print(x)
  print(x.sum(axis=1))
  print(x.sum(axis=0))
  </code></pre>
  
  <p>would output,</p>
  
  <pre><code>[[12 11 10  9]
   [16 15 14 13]
   [20 19 18 17]]
  
  
  [42 58 74]
  
  [48 45 42 39]
  </code></pre>
  
  <p>This makes sense as the sum along axis 1 (row) is <code>[42 58 74]</code> and axis 0 (column) is <code>[48 45 42 39]</code>.
  However, i am confused of how argmax work. From my understanding, argmax is supposed to return the max number along the axis. Below is my code and output.</p>
  
  <p>Code: <code>print(np.argmax(x,axis=1))</code>. Output: <code>[0 0 0]</code></p>
  
  <p>Code: <code>print(np.argmax(x,axis=0))</code>. Output: <code>[2 2 2 2]</code></p>
  
  <p>Where does <code>0</code> and <code>2</code> come from? I've deliberately used a set of more complex integer values (9..20) so as to distinguish between the <code>0</code> and <code>2</code> and the integer values inside the array. </p>