title: Python: Get array indexes of quartiles
body: <p>I am using the following code to calculate the quartiles of a given data set:</p>
  
  <pre><code>#!/usr/bin/python
  
  import numpy as np
  
  series = [1,2,2,2,2,2,2,2,2,2,2,5,5,6,7,8]
  
  p1 = 25
  p2 = 50
  p3 = 75
  
  q1 = np.percentile(series,  p1)
  q2 = np.percentile(series,  p2)
  q3 = np.percentile(series,  p3)
  
  print('percentile(' + str(p1) + '): ' + str(q1))
  print('percentile(' + str(p2) + '): ' + str(q2))
  print('percentile(' + str(p3) + '): ' + str(q3))
  </code></pre>
  
  <p>The percentile function returns the quartiles, however, I would also like to
  get the indexes which it used to mark the bounderies of the quartiles. Is there any way to do this?</p>