title: Divide ndarray by scalar - Numpy / Python
body: <p>I'm just wondering how could I do such thing without using loops.</p>
  
  <p>I made a simple test trying to call a division as we do with a numpy.array, but I got the same ndarray.</p>
  
  <pre><code>N = 2
  M = 3
  
  matrix_a = np.array([[15., 27., 360.],
              [180., 265., 79.]])
  matrix_b = np.array([[.5, 1., .3], 
              [.25, .7, .4]])
  
  matrix_c = np.zeros((N, M), float)
  
  n_size = 360./N
  m_size = 1./M
  
  for i in range(N):
      for j in range(M):
          n = int(matrix_a[i][j] / n_size) % N
          m = int(matrix_b[i][j] / m_size) % M
          matrix_c[n][m] += 1 
  
  matrix_c / (N * M)
  print matrix_c  
  </code></pre>
  
  <p>I guess this should be pretty simple.
  Any help would be appreciated.</p>