mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
GH-99155: Fix NormalDist pickle with 0 and 1 protocols (GH99156)
This commit is contained in:
parent
f626b7b504
commit
bef9efabc3
3 changed files with 15 additions and 3 deletions
|
|
@ -1446,3 +1446,9 @@ class NormalDist:
|
|||
|
||||
def __repr__(self):
|
||||
return f'{type(self).__name__}(mu={self._mu!r}, sigma={self._sigma!r})'
|
||||
|
||||
def __getstate__(self):
|
||||
return self._mu, self._sigma
|
||||
|
||||
def __setstate__(self, state):
|
||||
self._mu, self._sigma = state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue