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