normal#
- normal(network, seeds, mean=None, stddev=None, scale=None, loc=None)[source]#
Produces values from a Weibull distribution given a set of random numbers.
- Parameters:
network (OpenPNM Network object) – The network object to which this model is associated (i.e. attached). This controls the length of the calculated array(s), and also provides access to other necessary properties.
seeds (str (dict key)) – Name of the dictionary key on the target object pointing to the array containing values of eed
mean (float) – The mean value of the distribution. This is referred to as the
loc
in the scipy.stats function, and this key word is also accepted.stddev (float) – The standard deviation of the distribution. This is referred to as the
scale
in the scipy.stats function, and this key word is also accepted.
Examples
The following code illustrates the inner workings of this function, which uses the ‘norm’ method of the scipy.stats module. This can be used to find suitable values of ‘scale’ and ‘loc’.
import numpy import scipy.stats import matplotlib.pyplot as plt func = scipy.stats.norm(scale=.0001, loc=0.001) fig = plt.hist(func.ppf(q=numpy.random.rand(10000)), bins=50) plt.show()