我们从Python开源项目中,提取了以下3个代码示例,用于说明如何使用random.weibullvariate()。
def sample(self): return random.weibullvariate(self.alpha, self.beta)
def _execute(self, sources, alignment_stream, interval): if alignment_stream is None: raise ToolExecutionError("Alignment stream expected") for ti, _ in alignment_stream.window(interval, force_calculation=True): yield StreamInstance(ti, random.weibullvariate(alpha=self.alpha, beta=self.beta))