title: Filling two dimensional array with instances
body: <p>In one dimension I can make the following list:</p>
  
  <pre class="lang-py prettyprint-override"><code>models = [LinearRegression() for i in range(100)]
  
  for i in range(100):
      models[i].fit(X[i],Y[i])
  </code></pre>
  
  <p>Now I need to make something like a 2D array/ list-of-lists:</p>
  
  <pre class="lang-py prettyprint-override"><code>for i in range(100):
     for k in range(20):
         models[i,k].fit(X[i,k],Y[i,k])
  </code></pre>
  
  <p>The problem is I don't know how to make two dimensional array that is filled with instances of <code>LinearRegression</code>.</p>
  
  <p>I tried to write a list comprehension but couldn't get it to work:</p>
  
  <pre class="lang-py prettyprint-override"><code>
  models = [for k in range(20):(LinearRegression() for i in range(100))]
  </code></pre>