mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-36018: Make "seed" into a keyword only argument (GH-12921)
This commit is contained in:
parent
7280048690
commit
fb8c7d5332
2 changed files with 2 additions and 2 deletions
|
@ -797,7 +797,7 @@ class NormalDist:
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue