Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/statistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ of applications in statistics.
: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.
Expand Down
2 changes: 1 addition & 1 deletion Lib/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ def from_samples(cls, data):
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
Expand Down