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