title: indexing/slicing a 2d numpy array using the range/arange function as the argument
body: <p>I have a basic doubt in numpy.  I am using Python 2.7, numpy-1.9.2 on Ubuntu 14.04.</p>
  
  <p>For example, I initialize a 2d numpy array as <code>a = np.zeros((10,10))</code>.</p>
  
  <p>I then try to index a portion of it using the range function as the indices by the following way:</p>
  
  <p><code>a[range(0,5),range(0,5)]</code>.  I get an array of shape (5,).  What I want is the first 5 rows and columns of the 2d array <code>a</code>. </p>
  
  <p>When I perform <code>a[:5,:5]</code>, it seems to give me an array of shape (5,5).</p>
  
  <p>Can someone explain to me why using the range function for specifying the index is failing?  I am still confused about numpy indexing even after working with it for almost an year.</p>
  
  <p>Thanks for your help in advance.</p>