title: how to combine many 2d numpy arrays into 3d array with padding
body: <p>I have several numpy 2D arrays containing coordinates. I want to combine all of these 2D arrays into a single 3D array (lists of coordinates), with all missing coordinates padded with [0,0] to make each list the same size. I have something working using np.pad for combining 1D arrays to 2D, but can't get it working to go from 2D to 3D.</p>
  <p>For example:</p>
  <pre><code>[[0.1,0.1], [0.2,0.2], [0.3,0.3]]
  </code></pre>
  <p>Now, the 2d arrays have different sizes i.e. the hold different numbers of coordinates. The above is a (2,3) array. I may have a (2,5) and a (2,8) and a (2,6).</p>
  <p>So taking the above example, and the two arrays below:</p>
  <pre><code>[[0.2,0.2], [0.2,0.2], [0.2,0.2], [0.2,0.2], [0.2,0.2]]
  [[0.3,0.3], [0.3,0.3], [0.3,0.3], [0.3,0.3]]
  </code></pre>
  <p>The result would be (spaces added for clarity):</p>
  <pre><code>[
  [[0.1,0.1], [0.2,0.2], [0.3,0.3], [0.0,0.0], [0.0,0.0]]
  [[0.2,0.2], [0.2,0.2], [0.2,0.2], [0.2,0.2], [0.2,0.2]]
  [[0.3,0.3], [0.3,0.3], [0.3,0.3], [0.3,0.3], [0.0,0.0]]
  ]
  </code></pre>
  <p>Notice the final shape is (2,5,3), the first row slice has been padded with 2 [0,0], and the 3rd row slice has been padded with 1 [0,0]</p>
  <p>Appreciate any help!</p>