(self, percentile)
return lower + (pos - int(pos)) * (upper - lower)
get custom percentile
        
        :param percentile: float value between 0 and 1
get custom percentile
        
        :param percentile: float value between 0 and 1
get custom percentile : param percentile : float value between 0 and 1
def get_percentile(self, percentile):
        """
        get custom percentile
        
        :param percentile: float value between 0 and 1
        """
        if percentile < 0 or percentile > 1:
            raise ValueError("{0} is not in [0..1]".format(percentile))
        length = len(self.values)
        if length == 0:
            return 0
        pos = percentile * (length + 1)
        if pos < 1:
            return self.values[0]
        if pos >= length:
            return self.values[-1]
        lower = self.values[int(pos) - 1]
        upper = self.values[int(pos)]
        return lower + (pos - int(pos)) * (upper - lower)
def get_percentile ( self , percentile ) : if percentile < 0 or percentile > 1 : raise ValueError ( "{0} is not in [0..1]" . format ( percentile ) ) length = len ( self . values ) if length == 0 : return 0 pos = percentile * ( length + 1 ) if pos < 1 : return self . values [ 0 ] if pos >= length : return self . values [ - 1 ] lower = self . values [ int ( pos ) - 1 ] upper = self . values [ int ( pos ) ] return lower + ( pos - int ( pos ) ) * ( upper - lower )