title: vectorize image generation with two for loops
body: <p>I'm trying to generate sinusiod image but i see no alternative without using two for loops. Can someone help me vectorize this code?</p>
  <pre><code>import numpy as np
  M, N = 1001, 1001
  u = 100
  v = 200
  sin_img = np.zeros((M, N))
  for m in range(M):
    for n in range(N):
      sin_img[m, n] = np.sin((2 * np.pi * u * m / M) + (2 * np.pi * v * n / N))
  </code></pre>