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

Method test_exponential

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

Source from the content-addressed store, hash-verified

833 assert_array_almost_equal(non_contig, contig)
834
835 def test_exponential(self):
836 rng = random.RandomState(self.seed)
837 actual = rng.exponential(1.1234, size=(3, 2))
838 desired = np.array([[1.08342649775011624, 1.00607889924557314],
839 [2.46628830085216721, 2.49668106809923884],
840 [0.68717433461363442, 1.69175666993575979]])
841 assert_array_almost_equal(actual, desired, decimal=15)
842
843 def test_exponential_0(self):
844 assert_equal(random.exponential(scale=0), 0)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected