title: Compare two numpy arrays by first Column and create a third numpy array by concatenating two arrays
body: <p>I have two 2d numpy arrays which is used to plot simulation results.</p>
  
  <p>The first column of both arrays <code>a</code> and <code>b</code> contains the time intervals and the second column contains the data to be plotted. The two arrays have different shapes <code>a(500,2)</code> <code>b(600,2)</code>. I want to compare these two numpy arrays by first column and create a third array with matches found on the first column of <code>a</code>. If no match is found add 0 to third column.</p>
  
  <p>Is there any numpy trick to do this?</p>
  
  <p>For instance:</p>
  
  <pre><code>a=[[0.002,0.998],  
    [0.004,0.997],   
    [0.006,0.996],   
    [0.008,0.995],   
    [0.010,0.993]]   
  
  b= [[0.002,0.666],  
      [0.004,0.665],  
      [0.0041,0.664], 
      [0.0042,0.664], 
      [0.0043,0.664], 
      [0.0044,0.663], 
      [0.0045,0.663], 
      [0.0005,0.663], 
      [0.006,0.663], 
      [0.0061,0.662],
      [0.008,0.661]] 
  </code></pre>
  
  <p>expected output </p>
  
  <pre><code>c= [[0.002,0.998,0.666],       
      [0.004,0.997,0.665],           
      [0.006,0.996,0.663],           
      [0.008,0.995,0.661],
      [0.010,0.993, 0   ]]  
  </code></pre>