Exemplo n.º 1
0
 def get_yvals(self, x):
     if self.cumulative:
         raise ValueError("dont' support getting y vals for cumulative")
     if self.isfunc:
         return self.pofx(x)
     else:
         rand = stat.interplin(self.xvals, self.pofx, x)
Exemplo n.º 2
0
 def get_yvals(self, x):
     if self.cumulative:
         raise ValueError("dont' support getting y vals for cumulative")
     if self.isfunc:
         return self.pofx(x)
     else:
         rand = stat.interplin(self.xvals, self.pofx, x)
Exemplo n.º 3
0
    def _genrand_accum(self, numrand):

        # this returns f8
        urand = self.rng.uniform(size=numrand)

        # to get randoms from the distribution, we interpolate the x(pcum) at
        # the test rand values.  Clever!
        rand = stat.interplin(self.xvals, self.pcum, urand)

        return rand
Exemplo n.º 4
0
    def _genrand_accum(self, numrand):

        # this returns f8
        urand = self.rng.uniform(size=numrand)

        # to get randoms from the distribution, we interpolate the x(pcum) at
        # the test rand values.  Clever!
        rand = stat.interplin(self.xvals, self.pcum, urand)

        return rand
Exemplo n.º 5
0
    def genrand_accum(self, numrand, seed=None):
        if seed is not None:
            numpy.random.seed(seed=seed)

        # this returns f8
        urand = numpy.random.random(numrand)

        # to get randoms from the distribution, we interpolate the x(pcum) at
        # the test rand values.  Clever!
        rand = stat.interplin(self.xvals, self.pcum, urand)

        return rand
Exemplo n.º 6
0
    def genrand_accum(self, numrand, seed=None):
        if seed is not None:
            numpy.random.seed(seed=seed)

        # this returns f8
        urand = numpy.random.random(numrand)

        # to get randoms from the distribution, we interpolate the x(pcum) at
        # the test rand values.  Clever!
        rand = stat.interplin(self.xvals, self.pcum, urand)

        return rand