(self)
| 712 | assert_allclose(h, expected) |
| 713 | |
| 714 | def test_rightmost_binedge(self): |
| 715 | # Test event very close to rightmost binedge. See Github issue #4266 |
| 716 | x = [0.9999999995] |
| 717 | bins = [[0., 0.5, 1.0]] |
| 718 | hist, _ = histogramdd(x, bins=bins) |
| 719 | assert_(hist[0] == 0.0) |
| 720 | assert_(hist[1] == 1.) |
| 721 | x = [1.0] |
| 722 | bins = [[0., 0.5, 1.0]] |
| 723 | hist, _ = histogramdd(x, bins=bins) |
| 724 | assert_(hist[0] == 0.0) |
| 725 | assert_(hist[1] == 1.) |
| 726 | x = [1.0000000001] |
| 727 | bins = [[0., 0.5, 1.0]] |
| 728 | hist, _ = histogramdd(x, bins=bins) |
| 729 | assert_(hist[0] == 0.0) |
| 730 | assert_(hist[1] == 0.0) |
| 731 | x = [1.0001] |
| 732 | bins = [[0., 0.5, 1.0]] |
| 733 | hist, _ = histogramdd(x, bins=bins) |
| 734 | assert_(hist[0] == 0.0) |
| 735 | assert_(hist[1] == 0.0) |
| 736 | |
| 737 | def test_finite_range(self): |
| 738 | vals = np.random.random((100, 3)) |
nothing calls this directly
no test coverage detected