(self)
| 122 | |
| 123 | class TestBinomial: |
| 124 | def test_n_zero(self): |
| 125 | # Tests the corner case of n == 0 for the binomial distribution. |
| 126 | # binomial(0, p) should be zero for any p in [0, 1]. |
| 127 | # This test addresses issue #3480. |
| 128 | zeros = np.zeros(2, dtype='int') |
| 129 | for p in [0, .5, 1]: |
| 130 | assert_(random.binomial(0, p) == 0) |
| 131 | assert_array_equal(random.binomial(zeros, p), zeros) |
| 132 | |
| 133 | def test_p_is_nan(self): |
| 134 | # Issue #4571. |
nothing calls this directly
no test coverage detected