MCPcopy Create free account
hub / github.com/numpy/numpy / test_chisquare

Method test_chisquare

numpy/random/tests/test_random.py:1231–1242  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1229 assert_array_almost_equal(actual, desired, decimal=14)
1230
1231 def test_chisquare(self):
1232 df = [1]
1233 bad_df = [-1]
1234 chisquare = np.random.chisquare
1235 desired = np.array([0.57022801133088286,
1236 0.51947702108840776,
1237 0.1320969254923558])
1238
1239 self.setSeed()
1240 actual = chisquare(df * 3)
1241 assert_array_almost_equal(actual, desired, decimal=14)
1242 assert_raises(ValueError, chisquare, bad_df * 3)
1243
1244 def test_noncentral_chisquare(self):
1245 df = [1]

Callers

nothing calls this directly

Calls 3

setSeedMethod · 0.95
assert_raisesFunction · 0.90

Tested by

no test coverage detected