title: Adding column to numpy array based on where condition
body: <p>I have a numpy array and I would like to update a column of values in it with data from a second array. Somewhat like a vlookup function in excel.</p>
  
  <p>Need to look-up the first column of <code>a</code> in the <code>b</code> table. Then replace the second column in <code>a</code> with the number from the second column in <code>b</code>.</p>
  
  <pre><code>import numpy as np
  
  # type, newval
  a = np.array( [[1, 23, 0],
                [2, 24, 0],
                [1, 15, 0],
                [1, 27, 0],
                [6, 22, 0],
                [1, 18, 0]]
                )
  
  # type, newval
  b = np.array([[1, 1.1],
              [2, 2.1],
              [3, 3.1],
              [4, 4.1],
              [5, 5.1],
              [6, 6.1]]
              )
  
  a[:,2] = np.where(b[:,0] == a[:,0], b[:,1], None)
  </code></pre>
  
  <p><strong>Expected result</strong>
  <strong>Note:</strong> I would like the original array <code>a</code> to be updated with the lookup values.</p>
  
  <pre><code>a = array( [[1, 23, 1.1],
              [2, 24, 2.1],
              [1, 15, 1.1],
              [1, 27, 1.1],
              [6, 22, 6.1],
              [1, 18, 1.1]]
            )
  </code></pre>
  
  <p>What I get however is <code>nan</code> beside the last 4 items in the array. It likes like my <code>np.where</code> condition is replacing the value where the position AND the number are correct, not just where the number matches.</p>