()
| 2514 | |
| 2515 | |
| 2516 | def test_hist_float16(): |
| 2517 | np.random.seed(19680801) |
| 2518 | values = np.clip( |
| 2519 | np.random.normal(0.5, 0.3, size=1000), 0, 1).astype(np.float16) |
| 2520 | h = plt.hist(values, bins=3, alpha=0.5) |
| 2521 | bc = h[2] |
| 2522 | # Check that there are no overlapping rectangles |
| 2523 | for r in range(1, len(bc)): |
| 2524 | rleft = bc[r-1].get_corners() |
| 2525 | rright = bc[r].get_corners() |
| 2526 | # right hand position of left rectangle <= |
| 2527 | # left hand position of right rectangle |
| 2528 | assert rleft[1][0] <= rright[0][0] |
| 2529 | |
| 2530 | |
| 2531 | @image_comparison(['hist_step_empty.png'], remove_text=True, style='_classic_test') |
nothing calls this directly
no test coverage detected
searching dependent graphs…