Skip to content

Commit e511007

Browse files
committed
Add test for nans in hist input
1 parent 5e351ab commit e511007

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,13 @@ def test_barh_tick_label():
14731473
align='center')
14741474

14751475

1476+
def test_hist_nans():
1477+
# Check that histogram input data can include nans
1478+
fig, ax = plt.subplots()
1479+
ax.hist([1, 2, 1, 2, 3, np.nan],
1480+
weights=[1, 1, 1, np.nan, 1, 1])
1481+
1482+
14761483
@image_comparison(baseline_images=['hist_log'],
14771484
remove_text=True)
14781485
def test_hist_log():

0 commit comments

Comments
 (0)