(self)
| 1242 | assert_raises(ValueError, chisquare, bad_df * 3) |
| 1243 | |
| 1244 | def test_noncentral_chisquare(self): |
| 1245 | df = [1] |
| 1246 | nonc = [2] |
| 1247 | bad_df = [-1] |
| 1248 | bad_nonc = [-2] |
| 1249 | nonc_chi = np.random.noncentral_chisquare |
| 1250 | desired = np.array([9.0015599467913763, |
| 1251 | 4.5804135049718742, |
| 1252 | 6.0872302432834564]) |
| 1253 | |
| 1254 | self.setSeed() |
| 1255 | actual = nonc_chi(df * 3, nonc) |
| 1256 | assert_array_almost_equal(actual, desired, decimal=14) |
| 1257 | assert_raises(ValueError, nonc_chi, bad_df * 3, nonc) |
| 1258 | assert_raises(ValueError, nonc_chi, df * 3, bad_nonc) |
| 1259 | |
| 1260 | self.setSeed() |
| 1261 | actual = nonc_chi(df, nonc * 3) |
| 1262 | assert_array_almost_equal(actual, desired, decimal=14) |
| 1263 | assert_raises(ValueError, nonc_chi, bad_df, nonc * 3) |
| 1264 | assert_raises(ValueError, nonc_chi, df, bad_nonc * 3) |
| 1265 | |
| 1266 | def test_standard_t(self): |
| 1267 | df = [1] |
nothing calls this directly
no test coverage detected