Exemplo n.º 1
0
 def setup(self, distribution):
     distname, params = distribution
     dist = getattr(stats, distname)
     domain = dist.support(*params)
     self.urng = np.random.default_rng(0x2fc9eb71cd5120352fa31b7a048aa867)
     x = np.arange(domain[0], domain[1] + 1)
     self.pv = dist.pmf(x, *params)
     self.rng = stats.DiscreteAliasUrn(self.pv, random_state=self.urng)
Exemplo n.º 2
0
 def time_dau_setup(self, distribution):
     stats.DiscreteAliasUrn(self.pv, random_state=self.urng)
Exemplo n.º 3
0
 def time_dau_setup(self, distribution):
     stats.DiscreteAliasUrn(self.pv, seed=self.urng)