title: Fastest method to create 2D numpy array whose elements are in range
body: <p>I want to create a 2D numpy array where I want to store the coordinates of the pixels such that numpy array looks like this</p>
  
  <pre><code>[(0, 0), (0, 1), (0, 2), ...., (0, 510), (0, 511)
   (1, 0), (1, 1), (1, 2), ...., (1, 510), (1, 511)
   ..
   ..
   ..
   (511, 0), (511, 1), (511, 2), ...., (511, 510), (511, 511)]
  </code></pre>
  
  <p>This is a ridiculous question but I couldn't find anything yet.</p>