Skip to content
  • Sponsor matplotlib/matplotlib

  • Notifications You must be signed in to change notification settings
  • Fork 7.9k
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ca52114

Browse files
committedSep 29, 2019
Add datetime64 check
1 parent 3460857 commit ca52114

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎lib/matplotlib/tests/test_axes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,8 +1753,10 @@ def test_hist_datetime_datasets():
17531753
ax.hist(data, stacked=True)
17541754
ax.hist(data, stacked=False)
17551755

1756-
@pytest.mark.parametrize("bins_preprocess", [lambda bins: None, mpl.dates.date2num, lambda bins: bins],
1757-
ids=['None', 'date2num', 'datetime.datetime'])
1756+
@pytest.mark.parametrize("bins_preprocess",
1757+
[lambda bins: None, mpl.dates.date2num, lambda bins: bins,
1758+
lambda bins: np.asarray(bins).astype('datetime64')],
1759+
ids=['None', 'date2num', 'datetime.datetime', 'np.datetime64'])
17581760
def test_hist_datetime_datasets_bins(bins_preprocess):
17591761
data = [[datetime.datetime(2019, 1, 5), datetime.datetime(2019, 1, 11),
17601762
datetime.datetime(2019, 2, 1), datetime.datetime(2019, 3, 1)],

0 commit comments

Comments
 (0)
Failed to load comments.