Test that adjacent entries in an edge array can be equal
(self)
| 782 | range=[[0.0, 1.0], [np.nan, 0.75], [0.25, 0.5]]) |
| 783 | |
| 784 | def test_equal_edges(self): |
| 785 | """ Test that adjacent entries in an edge array can be equal """ |
| 786 | x = np.array([0, 1, 2]) |
| 787 | y = np.array([0, 1, 2]) |
| 788 | x_edges = np.array([0, 2, 2]) |
| 789 | y_edges = 1 |
| 790 | hist, edges = histogramdd((x, y), bins=(x_edges, y_edges)) |
| 791 | |
| 792 | hist_expected = np.array([ |
| 793 | [2.], |
| 794 | [1.], # x == 2 falls in the final bin |
| 795 | ]) |
| 796 | assert_equal(hist, hist_expected) |
| 797 | |
| 798 | def test_edge_dtype(self): |
| 799 | """ Test that if an edge array is input, its type is preserved """ |
nothing calls this directly
no test coverage detected