title: Python Numpy: Why is nparray[ i ][ j ] slower than nparray[ i , j ]?
body: <p>I'm initializing a numpy array and then plugging in loop values at some arbitrary location; for some reason it seems that indexing using double brackets is literally twice as slow as indexing using comma notation.</p>
  
  <p><strong>EDIT:</strong> Based on Mike's answer, I'd like to understand how multidimensional indexing can be implemented as a single operation, and whether there ever is a point in using the first notation.</p>
  
  <pre><code>import numpy as np
  
  x = np.array([[1, 2, 3], [2, 3, 4], [3, 4, 5]])
  
  def access(arr):
      for i in range(1000):
          arr[1][2] = i
  
  def access2(arr):
      for i in range(1000):
          arr[1,2] = i        
  
  t1 = Timer('access(x)', 'from __main__ import access, x')
  print(t1.timeit(number = 1000))
  
  0.425940990448
  
  t2 = Timer('access2(x)', 'from __main__ import access2, x')
  print(t2.timeit(number = 1000))
  
  0.217132806778
  </code></pre>