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

Method test_standard_t

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

Source from the content-addressed store, hash-verified

1523 assert_raises(ValueError, nonc_chi, df, bad_nonc * 3)
1524
1525 def test_standard_t(self):
1526 df = [1]
1527 bad_df = [-1]
1528 t = random.standard_t
1529 desired = np.array([3.0702872575217643,
1530 5.8560725167361607,
1531 1.0274791436474273])
1532
1533 self.set_seed()
1534 actual = t(df * 3)
1535 assert_array_almost_equal(actual, desired, decimal=14)
1536 assert_raises(ValueError, t, bad_df * 3)
1537 assert_raises(ValueError, random.standard_t, bad_df * 3)
1538
1539 def test_vonmises(self):
1540 mu = [2]

Callers

nothing calls this directly

Calls 4

set_seedMethod · 0.95
assert_raisesFunction · 0.90
tFunction · 0.85

Tested by

no test coverage detected