(self)
| 19 | pass |
| 20 | |
| 21 | def test_simple(self): |
| 22 | n = 100 |
| 23 | v = np.random.rand(n) |
| 24 | (a, b) = histogram(v) |
| 25 | # check if the sum of the bins equals the number of samples |
| 26 | assert_equal(np.sum(a, axis=0), n) |
| 27 | # check that the bin counts are evenly spaced when the data is from |
| 28 | # a linear function |
| 29 | (a, b) = histogram(np.linspace(0, 10, 100)) |
| 30 | assert_array_equal(a, 10) |
| 31 | |
| 32 | def test_one_bin(self): |
| 33 | # Ticket 632 |
nothing calls this directly
no test coverage detected