title: NumPy: Find the maximum value from each row set it to 1 and rest as 0
body: <p>I have a 2D numpy array as this,</p>
  
  <pre><code>array([[ 0.49596769,  1.15846407, -1.38944733],
         [-0.47042814, -0.07512128 , 1.90417981]], dtype=float32)
  </code></pre>
  
  <p>I want to find the maximum for each row and change it to 1 and rest as 0. Like this.</p>
  
  <pre><code>array([[ 0.,  1.,  0.],
         [ 0.,  0.,  1.]], dtype=float32)
  </code></pre>
  
  <p>What is the most efficient way to get it done using numpy?</p>