random¶
- openpnm.models.misc.statistical_distributions.random(target, element, seed=None, num_range=[0, 1])[source]¶
Create an array of random numbers of a specified size.
- Parameters
target (OpenPNM Base object) – Object with which this model is associated. This controls the length of the calculated array, and also provides access to other necessary properties.
seed (int) – The starting seed value to sent to numpy’s random number generator. A value of
None
means a different distribution is returned each time the model is (re)run.num_range (list) – A two element list indicating the low and high end of the returned numbers. The default is
[0, 1]
, but a value of[0.1, 0.9]
may be useful if these values are to be used in subsequent distributions to prevent generating extreme values in the tails.
- Returns
values – A numpy ndarray containing values following the distribution
- Return type
ndndarray