title: How to generate 2d numpy array?
body: <p>I'm trying to generate a 2d numpy array with the help of generators:</p>
  
  <pre><code>x = [[f(a) for a in g(b)] for b in c]
  </code></pre>
  
  <p>And if I try to do something like this:</p>
  
  <pre><code>x = np.array([np.array([f(a) for a in g(b)]) for b in c])
  </code></pre>
  
  <p>I, as expected, get a np.array of np.array. But I want not this, but ndarray, so I can get, for example, column in a way like this:</p>
  
  <pre><code>y = x[:, 1]
  </code></pre>
  
  <p>So, I'm curious whether there is a way to generate it in such a way.</p>
  
  <p>Of course it is possible with creating npdarray of required size and filling it with required values, but I want a way to do so in a line of code. </p>