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

Method test_standard_t

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

Source from the content-addressed store, hash-verified

1264 assert_raises(ValueError, nonc_chi, df, bad_nonc * 3)
1265
1266 def test_standard_t(self):
1267 df = [1]
1268 bad_df = [-1]
1269 t = np.random.standard_t
1270 desired = np.array([3.0702872575217643,
1271 5.8560725167361607,
1272 1.0274791436474273])
1273
1274 self.setSeed()
1275 actual = t(df * 3)
1276 assert_array_almost_equal(actual, desired, decimal=14)
1277 assert_raises(ValueError, t, bad_df * 3)
1278
1279 def test_vonmises(self):
1280 mu = [2]

Callers

nothing calls this directly

Calls 4

setSeedMethod · 0.95
assert_raisesFunction · 0.90
tFunction · 0.85

Tested by

no test coverage detected