title: Making a index array from an array in numpy
body: <p>Good morning experts,</p>
  
  <p>I have an array which contain integer numbers, and I have a list with the unique values that are in the array sorted in special order. What I want is to make another array  which will contain the indexes of each value in the a array.</p>
  
  <pre><code>#a numpy array with integer values
  #size_x and size_y: array dimensions of a
  #index_list contain the unique values of a sorted in a special order.
  #b New array with the index values
  
  for i in xrange(0,size_x):
       for j in xrange(0,size_y):                    
           b[i][j]=index_list.index(a[i][j])
  </code></pre>
  
  <p>This works but it takes long time to do it. Is there a faster way to do it?</p>
  
  <p>Many thanks for your help</p>
  
  <p>German</p>