(self)
| 170 | assert_raises(ValueError, random.multinomial, -1, [0.8, 0.2]) |
| 171 | |
| 172 | def test_p_non_contiguous(self): |
| 173 | p = np.arange(15.) |
| 174 | p /= np.sum(p[1::3]) |
| 175 | pvals = p[1::3] |
| 176 | rng = random.RandomState(1432985819) |
| 177 | non_contig = rng.multinomial(100, pvals=pvals) |
| 178 | rng = random.RandomState(1432985819) |
| 179 | contig = rng.multinomial(100, pvals=np.ascontiguousarray(pvals)) |
| 180 | assert_array_equal(non_contig, contig) |
| 181 | |
| 182 | def test_multinomial_pvals_float32(self): |
| 183 | x = np.array([9.9e-01, 9.9e-01, 1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09, |
nothing calls this directly
no test coverage detected