MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / weibullvariate

Method weibullvariate

tools/python-3.11.9-amd64/Lib/random.py:771–780  ·  view source on GitHub ↗

Weibull distribution. alpha is the scale parameter and beta is the shape parameter.

(self, alpha, beta)

Source from the content-addressed store, hash-verified

769 return u ** (-1.0 / alpha)
770
771 def weibullvariate(self, alpha, beta):
772 """Weibull distribution.
773
774 alpha is the scale parameter and beta is the shape parameter.
775
776 """
777 # Jain, pg. 499; bug fix courtesy Bill Arms
778
779 u = 1.0 - self.random()
780 return alpha * (-_log(u)) ** (1.0 / beta)
781
782
783## ------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

randomMethod · 0.80

Tested by

no test coverage detected