title: Transform list into numpy matrix
body: <p>I have a matrix <code>X</code> and a list <code>centres</code>. I want to create a new numpy matrix <code>td_X</code>.</p>
  
  <p>I want to populate <code>td_X</code> with the which is made up of the rows of <code>X</code> where the index is equal to centres. In pseudocode:</p>
  
  <pre><code>for each in centers:
    td_X.append(X[eacj])
  </code></pre>
  
  <p>How can I do this using Python?</p>