(self)
| 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]) |
| 247 | y = array([1, 1, 1, 2, 2, 2, 3, 3, 3]) |
| 248 | H, xed, yed = histogram2d( |
| 249 | x, y, [[1, 2, 3, 5], [1, 2, 3, 5]], density=True) |
| 250 | answer = array([[1, 1, .5], |
| 251 | [1, 1, .5], |
| 252 | [.5, .5, .25]]) / 9. |
| 253 | assert_array_almost_equal(H, answer, 3) |
| 254 | |
| 255 | def test_all_outliers(self): |
| 256 | r = np.random.rand(100) + 1. + 1e6 # histogramdd rounds by decimal=6 |
nothing calls this directly
no test coverage detected