def percentiles(self, percentiles):
    """Given a list of percentiles (floats between 0 and 1), return a
    list of the values at those percentiles, interpolating if
    necessary."""
    try:
      scores = [0.0]*len(percentiles)

      if self.count > 0:
        values = self.samples()
        values.sort()

        for i in range(len(percentiles)):
          p = percentiles[i]
          pos = p * (len(values) + 1)
          if pos < 1:
            scores[i] = values[0]
          elif pos > len(values):
            scores[i] = values[-1]
          else:
            upper, lower = values[int(pos - 1)], values[int(pos)]
            scores[i] = lower + (pos - floor(pos)) * (upper - lower)

      return scores
    except __HOLE__:
      return [float('NaN')] * len(percentiles)
dataset/ETHPy150Open Cue/scales/src/greplin/scales/samplestats.py/Sampler.percentiles