mirror of
https://github.com/python/cpython.git
synced 2025-10-15 03:10:29 +00:00
Statistics inv_cdf sync with corresponding random module normal distributions (#95265)
This commit is contained in:
parent
b7ce4625fe
commit
4395ff1e6a
3 changed files with 5 additions and 6 deletions
|
@ -2801,9 +2801,10 @@ class TestNormalDist:
|
|||
iq.inv_cdf(1.0) # p is one
|
||||
with self.assertRaises(self.module.StatisticsError):
|
||||
iq.inv_cdf(1.1) # p over one
|
||||
with self.assertRaises(self.module.StatisticsError):
|
||||
iq = NormalDist(100, 0) # sigma is zero
|
||||
iq.inv_cdf(0.5)
|
||||
|
||||
# Supported case:
|
||||
iq = NormalDist(100, 0) # sigma is zero
|
||||
self.assertEqual(iq.inv_cdf(0.5), 100)
|
||||
|
||||
# Special values
|
||||
self.assertTrue(math.isnan(Z.inv_cdf(float('NaN'))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue