(self)
| 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]) |
| 229 | y = array([1, 1, 1, 2, 2, 2, 3, 3, 3]) |
| 230 | H, xed, yed = histogram2d( |
| 231 | x, y, [[1, 2, 3, 5], [1, 2, 3, 5]], density=True) |
| 232 | answer = array([[1, 1, .5], |
| 233 | [1, 1, .5], |
| 234 | [.5, .5, .25]])/9. |
| 235 | assert_array_almost_equal(H, answer, 3) |
| 236 | |
| 237 | def test_all_outliers(self): |
| 238 | r = np.random.rand(100) + 1. + 1e6 # histogramdd rounds by decimal=6 |
nothing calls this directly
no test coverage detected