title: What are the numpy equivalents of R's row() and col() functions?
body: <p>How to create arrays </p>
  
  <pre><code>0 0 ... 0
  1 1 ... 1
  ...
  N N ... N
  </code></pre>
  
  <p>and </p>
  
  <pre><code>0 1 ... M
  0 1 ... M
  ...
  0 1 ... M
  </code></pre>
  
  <p>The best I can do is:</p>
  
  <pre><code>a = np.tile(np.arange(N+1),(M+1,1)).T
  b = np.tile(np.arange(M+1),(N+1,1))
  </code></pre>
  
  <p>Is there a better solution?</p>