visigoth.flexible_values¶
- visigoth.flexible_values(val, size=None, random_state=None, min=- inf, max=inf)[source]¶
Flexibly determine a number of values.
- Input format can be:
A numeric value, which will be used exactly.
A list of possible values, which will be randomly chosen from.
A tuple of (dist, arg0[, arg1, …]), which will be used to generate random observations from a scipy random variable.
- Parameters
- valfloat, list, or tuple
Flexibile specification of value, set of values, or distribution parameters. See above for more information.
- sizeint or tuple, optional
Output shape. A
size
of None implies a scalar result.- random_statenumpy.random.RandomState object, optional
Object to allow reproducible random values.
- min, maxfloat
Exclusive limits on the return values that are enforced using rejection sampling.
- Returns
- outscalar or array
Output values with shape
size
, or a scalar ifsize
is 1.