MCPcopy Index your code
hub / github.com/numpy/numpy / test_gamma

Method test_gamma

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

Source from the content-addressed store, hash-verified

853 assert_array_almost_equal(actual, desired, decimal=15)
854
855 def test_gamma(self):
856 rng = random.RandomState(self.seed)
857 actual = rng.gamma(5, 3, size=(3, 2))
858 desired = np.array([[24.60509188649287182, 28.54993563207210627],
859 [26.13476110204064184, 12.56988482927716078],
860 [31.71863275789960568, 33.30143302795922011]])
861 assert_array_almost_equal(actual, desired, decimal=14)
862
863 def test_gamma_0(self):
864 assert_equal(random.gamma(shape=0, scale=0), 0)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected