mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-38521: Fix error in NormalDist.__eq__() (GH-16840)
This commit is contained in:
parent
ecb035cd14
commit
5eabec022b
3 changed files with 6 additions and 1 deletions
|
|
@ -1092,7 +1092,7 @@ class NormalDist:
|
|||
"Two NormalDist objects are equal if their mu and sigma are both equal."
|
||||
if not isinstance(x2, NormalDist):
|
||||
return NotImplemented
|
||||
return (x1._mu, x2._sigma) == (x2._mu, x2._sigma)
|
||||
return x1._mu == x2._mu and x1._sigma == x2._sigma
|
||||
|
||||
def __hash__(self):
|
||||
"NormalDist objects hash equal if their mu and sigma are both equal."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue