(self)
| 37 | assert_array_equal(a, 10) |
| 38 | |
| 39 | def test_one_bin(self): |
| 40 | # Ticket 632 |
| 41 | hist, edges = histogram([1, 2, 3, 4], [1, 2]) |
| 42 | assert_array_equal(hist, [2, ]) |
| 43 | assert_array_equal(edges, [1, 2]) |
| 44 | assert_raises(ValueError, histogram, [1, 2], bins=0) |
| 45 | h, e = histogram([1, 2], bins=1) |
| 46 | assert_equal(h, np.array([2])) |
| 47 | assert_allclose(e, np.array([1., 2.])) |
| 48 | |
| 49 | def test_density(self): |
| 50 | # Check that the integral of the density equals 1. |
nothing calls this directly
no test coverage detected