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

Method test_invalid_prob

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

Source from the content-addressed store, hash-verified

159 float(1))
160
161 def test_invalid_prob(self):
162 assert_raises(ValueError, random.multinomial, 100, [1.1, 0.2])
163 assert_raises(ValueError, random.multinomial, 100, [-.1, 0.9])
164
165 def test_invalid_n(self):
166 assert_raises(ValueError, random.multinomial, -1, [0.8, 0.2])

Callers

nothing calls this directly

Calls 1

assert_raisesFunction · 0.90

Tested by

no test coverage detected