Skip to content

Commit

Permalink
Add support for handling datetime.time types (#4267)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 5, 2020
1 parent d02b805 commit 7992636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions holoviews/core/util.py
Expand Up @@ -74,7 +74,7 @@ def __cmp__(self, other):
numpy_version = LooseVersion(np.__version__)
param_version = LooseVersion(param.__version__)

datetime_types = (np.datetime64, dt.datetime, dt.date)
datetime_types = (np.datetime64, dt.datetime, dt.date, dt.time)
timedelta_types = (np.timedelta64, dt.timedelta,)
arraylike_types = (np.ndarray,)

Expand Down Expand Up @@ -954,7 +954,7 @@ def max_range(ranges, combined=True):
with warnings.catch_warnings():
warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered')
values = [tuple(np.NaN if v is None else v for v in r) for r in ranges]
if pd and any(isinstance(v, datetime_types) and not isinstance(v, cftime_types)
if pd and any(isinstance(v, datetime_types) and not isinstance(v, cftime_types+(dt.time,))
for r in values for v in r):
converted = []
for l, h in values:
Expand Down

0 comments on commit 7992636

Please sign in to comment.