title: numpy.take range of array elements Python
body: <p>I have an array of integers.</p>
  
  <pre><code>data = [10,20,30,40,50,60,70,80,90,100]
  </code></pre>
  
  <p>I want to extract a range of integers from the array and get a smaller array.</p>
  
  <pre><code>data_extracted = [20,30,40]
  </code></pre>
  
  <p>I tried <code>numpy.take</code>.</p>
  
  <pre><code>data = [10,20,30,40,50,60,70,80,90,100]
  start = 1    # index of starting data entry (20)
  end = 3      # index of ending data entry (40)
  data_extracted = np.take(data,[start:end])
  </code></pre>
  
  <p>I get a syntax error pointing to the <code>:</code> in numpy.take.</p>
  
  <p>Is there a better way to use <code>numpy.take</code> to store part of an array in a separate array? </p>