(self,shape,scale)
return float(pos)
uses a inversion method: the chop-down-search starting \
        at the mode
uses a inversion method: the chop-down-search starting \
        at the mode
uses a inversion method : the chop - down - search starting \ at the mode
def rvs(self,shape,scale):
        "uses a inversion method: the chop-down-search starting \
        at the mode"
        pos =  mode = float(max(0,int(shape-scale)))
        U = self.Uni.rvs()
        sum = self.pdf(mode,shape,scale)
        ub = mode+1
        lb = mode-1
        Pub = sum*scale/(mode+1+shape)
        Plb = sum*(mode+shape)/scale
        while sum<U:
            if Plb>Pub and lb>=0:
                sum+=Plb
                pos = lb
                Plb = (lb+shape)/scale*Plb
                lb-=1
            else:
                sum+=Pub
                pos= ub
                Pub = scale/(ub+1+shape)*Pub
                ub+=1
        return float(pos)
def rvs ( self , shape , scale ) : pos = mode = float ( max ( 0 , int ( shape - scale ) ) ) U = self . Uni . rvs ( ) sum = self . pdf ( mode , shape , scale ) ub = mode + 1 lb = mode - 1 Pub = sum * scale / ( mode + 1 + shape ) Plb = sum * ( mode + shape ) / scale while sum < U : if Plb > Pub and lb >= 0 : sum += Plb pos = lb Plb = ( lb + shape ) / scale * Plb lb -= 1 else : sum += Pub pos = ub Pub = scale / ( ub + 1 + shape ) * Pub ub += 1 return float ( pos )