title: IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
body: <p>I am working on the snippet</p>
  
  <pre><code>top[0].data[128,0:128] = (fc1[self.keep1.tolist()])[self.keep2[128].tolist()]
  </code></pre>
  
  <p>keep1 has the data </p>
  
  <pre><code>[
    0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, ...... 114.0, 115.0, 116.0, 117.0, 118.0, 119.0
  ]
  </code></pre>
  
  <p>keep2 has the data </p>
  
  <pre><code>[ 
     125.  800.  255.  119.  801.  804.  114.  368.  636.  308.  805.  213.
     ......218.   373.
  ]
  </code></pre>
  
  <p>I got a problem saying "IndexError: only integers, slices (<code>:</code>), ellipsis (<code>...</code>), numpy.newaxis (<code>None</code>) and integer or boolean arrays are valid indices"</p>
  
  <p>I tried  self.keep2[128].tolist().astype(int), but it does say tolist() has no method astype(int)</p>
  
  <p>how could I solve it?</p>