Python‎ > ‎random‎ > ‎

random.weibullvariate()

http://www.adilwaseem.com/

Introduction
The weibullvariate(alpha, beta) method of random.Random instance Weibull distribution.

Syntax
random.weibullvariate(alpha,beta)

Parameters
alpha = scale parameter
beta= shape parameter.

Examples
The return is:
>>>import random
>>>random.weibullvariate(220,1200)

220.0427861889099
>>>

The method return with the sample random from the random methods.
import random
a=[random.weibullvariate(1,4),random.choice([1,3,5,7]),random.getrandbits(3)]
print(random.sample(a,1))

>>> 
[0.8132223906535521]
>>>


Comments