title: Python numpy - IndexError: too many indices for array
body: <p>I'm fairly new to python but this example just won't work for me. I believe it's meant to index x but I'm not 100% sure.</p>
  
  <pre><code>import numpy as np
  
  y = np.array([0,1,2,3,4,5,2,4,1,9])
  x = np.array(['e','l','t','d','m','f','c','j','x','a'])
  
  print
  print
  print "Y"
  print type(y)
  print y
  print
  print
  print "X"
  print type(x)
  print x
  print
  print
  
  
  result = x[0, y]
  </code></pre>
  
  <p>The exact error I get is</p>
  
  <pre><code>Traceback (most recent call last):
  File "test.py", line 20, in &lt;module&gt;
  result = x[0, y]
  IndexError: too many indices for array
  </code></pre>