:exc:`StatisticsError` because it takes at least one point to estimate
a central value and at least two points to estimate dispersion.
- .. method:: NormalDist.samples(n, seed=None)
+ .. method:: NormalDist.samples(n, *, seed=None)
Generates *n* random samples for a given mean and standard deviation.
Returns a :class:`list` of :class:`float` values.
xbar = fmean(data)
return cls(xbar, stdev(data, xbar))
- def samples(self, n, seed=None):
+ def samples(self, n, *, seed=None):
'Generate *n* samples for a given mean and standard deviation.'
gauss = random.gauss if seed is None else random.Random(seed).gauss
mu, sigma = self.mu, self.sigma