title: Numpy: could not broadcast input array from shape (3) into shape (1)
body: <p>I want to create a numpy array <strong><em>b</em></strong> where each component is a 2D matrix, which dimensions are determined by the coordinates of vector <strong><em>a</em></strong>.</p>
  
  <p>What I get doing the following satisfies me:</p>
  
  <pre><code>&gt;&gt;&gt; a = [3,4,1]
  &gt;&gt;&gt; b = [np.zeros((a[i], a[i - 1] + 1)) for i in range(1, len(a))]
  &gt;&gt;&gt; np.array(b)
  array([ array([[ 0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.]]),
         array([[ 0.,  0.,  0.,  0.,  0.]])], dtype=object)
  </code></pre>
  
  <p>but if I have found this pathological case where it does not work:</p>
  
  <pre><code>&gt;&gt;&gt; a = [2,1,1]
  &gt;&gt;&gt; b = [np.zeros((a[i], a[i - 1] + 1)) for i in range(1, len(a))]
  &gt;&gt;&gt; b
  [array([[ 0.,  0.,  0.]]), array([[ 0.,  0.]])]
  &gt;&gt;&gt; np.array(b)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ValueError: could not broadcast input array from shape (3) into shape (1)
  </code></pre>