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

Method test_chisquare

numpy/random/tests/test_randomstate.py:1490–1501  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1488 assert_array_almost_equal(actual, desired, decimal=14)
1489
1490 def test_chisquare(self):
1491 df = [1]
1492 bad_df = [-1]
1493 chisquare = random.chisquare
1494 desired = np.array([0.57022801133088286,
1495 0.51947702108840776,
1496 0.1320969254923558])
1497
1498 self.set_seed()
1499 actual = chisquare(df * 3)
1500 assert_array_almost_equal(actual, desired, decimal=14)
1501 assert_raises(ValueError, chisquare, bad_df * 3)
1502
1503 def test_noncentral_chisquare(self):
1504 df = [1]

Callers

nothing calls this directly

Calls 3

set_seedMethod · 0.95
assert_raisesFunction · 0.90

Tested by

no test coverage detected