(self)
| 1501 | assert_raises(ValueError, chisquare, bad_df * 3) |
| 1502 | |
| 1503 | def test_noncentral_chisquare(self): |
| 1504 | df = [1] |
| 1505 | nonc = [2] |
| 1506 | bad_df = [-1] |
| 1507 | bad_nonc = [-2] |
| 1508 | nonc_chi = random.noncentral_chisquare |
| 1509 | desired = np.array([9.0015599467913763, |
| 1510 | 4.5804135049718742, |
| 1511 | 6.0872302432834564]) |
| 1512 | |
| 1513 | self.set_seed() |
| 1514 | actual = nonc_chi(df * 3, nonc) |
| 1515 | assert_array_almost_equal(actual, desired, decimal=14) |
| 1516 | assert_raises(ValueError, nonc_chi, bad_df * 3, nonc) |
| 1517 | assert_raises(ValueError, nonc_chi, df * 3, bad_nonc) |
| 1518 | |
| 1519 | self.set_seed() |
| 1520 | actual = nonc_chi(df, nonc * 3) |
| 1521 | assert_array_almost_equal(actual, desired, decimal=14) |
| 1522 | assert_raises(ValueError, nonc_chi, bad_df, nonc * 3) |
| 1523 | assert_raises(ValueError, nonc_chi, df, bad_nonc * 3) |
| 1524 | |
| 1525 | def test_standard_t(self): |
| 1526 | df = [1] |
nothing calls this directly
no test coverage detected