(self)
| 227 | assert_array_equal(yedges, np.linspace(0, 9, 11)) |
| 228 | |
| 229 | def test_asym(self): |
| 230 | x = array([1, 1, 2, 3, 4, 4, 4, 5]) |
| 231 | y = array([1, 3, 2, 0, 1, 2, 3, 4]) |
| 232 | H, xed, yed = histogram2d( |
| 233 | x, y, (6, 5), range=[[0, 6], [0, 5]], density=True) |
| 234 | answer = array( |
| 235 | [[0., 0, 0, 0, 0], |
| 236 | [0, 1, 0, 1, 0], |
| 237 | [0, 0, 1, 0, 0], |
| 238 | [1, 0, 0, 0, 0], |
| 239 | [0, 1, 1, 1, 0], |
| 240 | [0, 0, 0, 0, 1]]) |
| 241 | assert_array_almost_equal(H, answer / 8., 3) |
| 242 | assert_array_equal(xed, np.linspace(0, 6, 7)) |
| 243 | assert_array_equal(yed, np.linspace(0, 5, 6)) |
| 244 | |
| 245 | def test_density(self): |
| 246 | x = array([1, 2, 3, 1, 2, 3, 1, 2, 3]) |
nothing calls this directly
no test coverage detected