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

Method test_gumbel

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

Source from the content-addressed store, hash-verified

883 assert_raises(ValueError, random.geometric, [np.nan] * 10)
884
885 def test_gumbel(self):
886 rng = random.RandomState(self.seed)
887 actual = rng.gumbel(loc=.123456789, scale=2.0, size=(3, 2))
888 desired = np.array([[0.19591898743416816, 0.34405539668096674],
889 [-1.4492522252274278, -1.47374816298446865],
890 [1.10651090478803416, -0.69535848626236174]])
891 assert_array_almost_equal(actual, desired, decimal=15)
892
893 def test_gumbel_0(self):
894 assert_equal(random.gumbel(scale=0), 0)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected