title: "Merging" numpy arrays together with a common dimension
body: <p>I have two matricies, corresponding to data points <code>(x,y1)</code> and <code>(x,y2)</code>:</p>
  
  <pre><code>   x  |  y1
  ------------
     0  |  0
     1  |  1
     2  |  2
     3  |  3
     4  |  4
     5  |  5
  
      x   |  y2
  ----------------
     0.5  |  0.5
     1.5  |  1.5
     2.5  |  2.5
     3.5  |  3.5
     4.5  |  4.5
     5.5  |  5.5
  </code></pre>
  
  <p>I'd like to create a new matrix that combines the <code>x</code> values into a single column, and has <code>NaN</code>s in the appropriate <code>y1</code>, <code>y2</code> columns:</p>
  
  <pre><code>    x    |    y1    |   y2
  -----------------------------
      0    |     0    |  NaN
      0.5  |    NaN   |  0.5
      1    |     0    |  NaN
      1.5  |    NaN   |  1.5
      ...  |    ...   |  ...
      5    |     5    |  NaN
      5.5  |    NaN   |  5.5 
  </code></pre>
  
  <p>Is there an easy way to do this? I'm new to Python and NumPy (coming from MATLAB) and I'm not sure how I would even begin with this. (For reference, my approach to this in MATLAB is simply using an <a href="https://www.mathworks.com/help/matlab/ref/outerjoin.html#btx2pe6-4" rel="noreferrer"><code>outerjoin</code></a> against two tables that are generated with <a href="https://www.mathworks.com/help/matlab/ref/array2table.html" rel="noreferrer"><code>array2table</code></a>.)</p>