MCPcopy Index your code
hub / github.com/python/cpython / lognormvariate

Method lognormvariate

Lib/random.py:595–603  ·  view source on GitHub ↗

Log normal distribution. If you take the natural logarithm of this distribution, you'll get a normal distribution with mean mu and standard deviation sigma. mu can have any value, and sigma must be greater than zero.

(self, mu, sigma)

Source from the content-addressed store, hash-verified

593 return mu + z * sigma
594
595 def lognormvariate(self, mu, sigma):
596 """Log normal distribution.
597
598 If you take the natural logarithm of this distribution, you'll get a
599 normal distribution with mean mu and standard deviation sigma.
600 mu can have any value, and sigma must be greater than zero.
601
602 """
603 return _exp(self.normalvariate(mu, sigma))
604
605 def expovariate(self, lambd=1.0):
606 """Exponential distribution.

Callers 3

test_zeroinputsMethod · 0.95
test_basicsMethod · 0.80
test_heapMethod · 0.80

Calls 1

normalvariateMethod · 0.95

Tested by 3

test_zeroinputsMethod · 0.76
test_basicsMethod · 0.64
test_heapMethod · 0.64