예제 #1
0
    def testInverseChoicePy(self):
        n = 100
        a = numpy.array(numpy.random.randint(0, n, 50), numpy.int32)
        a = numpy.unique(a)

        numRuns = 1000 
        for i in range(numRuns): 
            j = inverseChoicePy(a, n)
            self.assertTrue(j not in a)
            self.assertTrue(j in numpy.arange(n))
예제 #2
0
 def run(): 
     numRuns = 2000000
     for i in range(numRuns): 
         inverseChoicePy(v, n)
예제 #3
0
 def run():
     numRuns = 2000000
     for i in range(numRuns):
         inverseChoicePy(v, n)