(self)
| 209 | assert_array_equal(yedges, np.linspace(0, 9, 11)) |
| 210 | |
| 211 | def test_asym(self): |
| 212 | x = array([1, 1, 2, 3, 4, 4, 4, 5]) |
| 213 | y = array([1, 3, 2, 0, 1, 2, 3, 4]) |
| 214 | H, xed, yed = histogram2d( |
| 215 | x, y, (6, 5), range=[[0, 6], [0, 5]], density=True) |
| 216 | answer = array( |
| 217 | [[0., 0, 0, 0, 0], |
| 218 | [0, 1, 0, 1, 0], |
| 219 | [0, 0, 1, 0, 0], |
| 220 | [1, 0, 0, 0, 0], |
| 221 | [0, 1, 1, 1, 0], |
| 222 | [0, 0, 0, 0, 1]]) |
| 223 | assert_array_almost_equal(H, answer/8., 3) |
| 224 | assert_array_equal(xed, np.linspace(0, 6, 7)) |
| 225 | assert_array_equal(yed, np.linspace(0, 5, 6)) |
| 226 | |
| 227 | def test_density(self): |
| 228 | x = array([1, 2, 3, 1, 2, 3, 1, 2, 3]) |
nothing calls this directly
no test coverage detected