Skip to content

Commit 4a0b368

Browse files
committed
BUG: use more generic type inference for fast plotting
xref pandas-dev#15073
1 parent e1a4144 commit 4a0b368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tseries/converter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from pandas.types.common import (is_float, is_integer,
1515
is_integer_dtype,
1616
is_float_dtype,
17-
is_datetime64_ns_dtype,
17+
is_datetime64_any_dtype,
1818
is_period_arraylike,
1919
)
2020

@@ -172,7 +172,7 @@ def _dt_to_float_ordinal(dt):
172172
is a :func:`float`.
173173
"""
174174
if (isinstance(dt, (np.ndarray, Index, Series)
175-
) and is_datetime64_ns_dtype(dt)):
175+
) and is_datetime64_any_dtype(dt)):
176176
base = dates.epoch2num(dt.asi8 / 1.0E9)
177177
else:
178178
base = dates.date2num(dt)

0 commit comments

Comments
 (0)