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

Method test_gumbel

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

Source from the content-addressed store, hash-verified

876 assert_raises(ValueError, random.geometric, [np.nan] * 10)
877
878 def test_gumbel(self):
879 random.seed(self.seed)
880 actual = random.gumbel(loc=.123456789, scale=2.0, size=(3, 2))
881 desired = np.array([[0.19591898743416816, 0.34405539668096674],
882 [-1.4492522252274278, -1.47374816298446865],
883 [1.10651090478803416, -0.69535848626236174]])
884 assert_array_almost_equal(actual, desired, decimal=15)
885
886 def test_gumbel_0(self):
887 assert_equal(random.gumbel(scale=0), 0)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected