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

Method test_gamma

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

Source from the content-addressed store, hash-verified

846 assert_array_almost_equal(actual, desired, decimal=15)
847
848 def test_gamma(self):
849 random.seed(self.seed)
850 actual = random.gamma(5, 3, size=(3, 2))
851 desired = np.array([[24.60509188649287182, 28.54993563207210627],
852 [26.13476110204064184, 12.56988482927716078],
853 [31.71863275789960568, 33.30143302795922011]])
854 assert_array_almost_equal(actual, desired, decimal=14)
855
856 def test_gamma_0(self):
857 assert_equal(random.gamma(shape=0, scale=0), 0)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected