mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-36018: Make __pos__ return a distinct instance of NormDist (GH-12009)
https://bugs.python.org/issue36018
This commit is contained in:
parent
e895de3e7f
commit
79fbcc597d
2 changed files with 13 additions and 1 deletions
|
@ -762,7 +762,7 @@ class NormalDist:
|
|||
return NormalDist(x1.mu / x2, x1.sigma / fabs(x2))
|
||||
|
||||
def __pos__(x1):
|
||||
return x1
|
||||
return NormalDist(x1.mu, x1.sigma)
|
||||
|
||||
def __neg__(x1):
|
||||
return NormalDist(-x1.mu, x1.sigma)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue