title: Python Index error (out of bounds) accessing element in 2D array
body: <p>I'm trying to access an element of a 2d array created from data in a csv file. I can print the array fine.</p>
  
  <p>When I try to access the array to find a certain element (i.e. a number from 'row' 1 'column' 5)  it throws the error:</p>
  
  <pre><code>C:\Users\AClayton\Current\python begin\code_tester.py in create_alldata(whichfile)
  37     array_data=np.array(all_data)
  ---&gt; 38     nb=array_data[1][5]
  IndexError: index 1 is out of bounds for axis 0 with size 1
  </code></pre>
  
  <p>if anyone could help that would be great </p>
  
  <pre><code>def create_alldata(whichfile):
      open_file = open(infile, 'rb')                       
      csv_current=csv.reader(open_file)                     
      all_data=[]                              
      np.array(all_data)
      for row in open_file:         
          all_data.append(row)                            
      open_file.close()
      array_data=np.array(all_data)
      nb=array_data[1][5]
      return array_data,    
  
  
  path=raw_input('What is the directory?')
  for infile in glob.glob(os.path.join(path, '*.csv')): 
      create_alldata(infile)
  </code></pre>