title: how can I flatten an 2d numpy array, which has different length in the second axis?
body: <p>I have a numpy array which looks like:</p>
  
  <pre><code>myArray = np.array([[1,2],[3]])
  </code></pre>
  
  <p>But I can not flatten it,</p>
  
  <pre><code>In: myArray.flatten()
  Out: array([[1, 2], [3]], dtype=object)
  </code></pre>
  
  <p>If I change the array to the same length in the second axis, then I can flatten it. </p>
  
  <pre><code>In: myArray2 = np.array([[1,2],[3,4]])
  In: myArray2.flatten()
  Out: array([1, 2, 3, 4])
  </code></pre>
  
  <p>My Question is: </p>
  
  <p>Can I use some thing like <code>myArray.flatten()</code> regardless the dimension of the array and the length of its elements, and get the output: <code>array([1,2,3])</code>?</p>