title: How to flatten a numpy object array with different shaped arrays?
body: <p>I've got an array <code>a</code></p>
  
  <pre class="lang-py prettyprint-override"><code>&gt;&gt; a = np.array([np.ones((4,5)), np.arange(6), np.arange(20).reshape((2,2,5))])
  &gt;&gt; a
  array([array([[1., 1., 1., 1., 1.],
         [1., 1., 1., 1., 1.],
         [1., 1., 1., 1., 1.],
         [1., 1., 1., 1., 1.]]),
         array([0, 1, 2, 3, 4, 5]),
         array([[[ 0,  1,  2,  3,  4],
          [ 5,  6,  7,  8,  9]],
  
         [[10, 11, 12, 13, 14],
          [15, 16, 17, 18, 19]]])], dtype=object)
  </code></pre>
  
  <p>and I want to flatten it to get something like <code>array(1, 1, 1, ... 17, 18, 19)</code>. How do I do this in the most efficient way?</p>