title: best way to create numpy array from FOR loop
body: <p>Is there a better way to create a multidimensional array in numpy using a FOR loop, rather than creating a list?  This is the only method I could come up with:</p>
  
  <pre><code>import numpy as np
  
  a = []
  for x in range(1,6):
      for y in range(1,6):
          a.append([x,y])
  a = np.array(a)
  print(f'Type(a) = {type(a)}.  a = {a}')
  </code></pre>
  
  <p>EDIT: I tried doing something like this:</p>
  
  <pre><code>a = np.array([range(1,6),range(1,6)])
  a.shape = (5,2)
  print(f'Type(a) = {type(a)}.  a = {a}')
  </code></pre>
  
  <p>however, the output is not the same. I'm sure I'm missing something basic.</p>