How to create this tabular data structure with numpy?
<p>I have several two-column tables that i want to join together with numpy. Each table has x and y columns. I need all the x columns joined together, with the y values matched up to the corresponding x. If an x value doesn't have a corresponding y, it should be None.</p>

<p>I'm not so good at explaining, so an example will probably be better:</p>

<pre><code>x1=np.arange(10)
y1=np.random.random(10)
x2=np.arange(4,12)
y2=np.random.random(8)
x1,y1,x2,y2
# (array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]),
#  array([ 0.9697099 ,  0.73551173,  0.47020836,  0.65181839,  0.978934  ,
    0.18953898,  0.46405499,  0.50087478,  0.06777209,  0.45780724]),
#  array([ 4,  5,  6,  7,  8,  9, 10, 11]),
#  array([ 0.4871265 ,  0.13677392,  0.17808162,  0.92777264,  0.43666515,
    0.96582633,  0.8801327 ,  0.96819467]))
</code></pre>

<p>I want it to result in this:</p>

<pre><code>(array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11]),
 array([0.9697099017727184, 0.7355117301087176, 0.47020836280801315,
   0.6518183854825162, 0.9789339965301322, 0.18953898439009775,
   0.46405499422617846, 0.5008747838856135, 0.06777208803132984,
   0.45780724068543743, None, None], dtype=object),
 array([None, None, None, None, 0.4871264999476407, 0.13677391508082204,
   0.17808162175961462, 0.927772639273923, 0.43666515340304246,
   0.9658263324455688, 0.880132700341068, 0.9681946747550136], dtype=object))
</code></pre>

<p>I tried searching but couldn't find anything. Perhaps i wasn't formulating my search correctly.</p>