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

Method test_f

numpy/random/tests/test_generator_mt19937.py:1274–1280  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1272 assert_raises(ValueError, random.exponential, scale=-0.)
1273
1274 def test_f(self):
1275 random = Generator(MT19937(self.seed))
1276 actual = random.f(12, 77, size=(3, 2))
1277 desired = np.array([[0.461720027077085, 1.100441958872451],
1278 [1.100337455217484, 0.91421736740018 ],
1279 [0.500811891303113, 0.826802454552058]])
1280 assert_array_almost_equal(actual, desired, decimal=15)
1281
1282 def test_gamma(self):
1283 random = Generator(MT19937(self.seed))

Callers

nothing calls this directly

Calls 2

fMethod · 0.45

Tested by

no test coverage detected