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

Method test_exponential

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

Source from the content-addressed store, hash-verified

826 assert_array_almost_equal(non_contig, contig)
827
828 def test_exponential(self):
829 random.seed(self.seed)
830 actual = random.exponential(1.1234, size=(3, 2))
831 desired = np.array([[1.08342649775011624, 1.00607889924557314],
832 [2.46628830085216721, 2.49668106809923884],
833 [0.68717433461363442, 1.69175666993575979]])
834 assert_array_almost_equal(actual, desired, decimal=15)
835
836 def test_exponential_0(self):
837 assert_equal(random.exponential(scale=0), 0)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected