Skip to content

Commit

Permalink
Don't error on TypeError in DaskInterface when sorting (#6221)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored May 17, 2024
1 parent f001b12 commit 023ad71
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions holoviews/core/data/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ def range(cls, dataset, dimension):
dimension = dataset.get_dimension(dimension, strict=True)
column = dataset.data[dimension.name]
if column.dtype.kind == 'O':
column = np.sort(column[column.notnull()].compute())
return (column[0], column[-1]) if len(column) else (None, None)
try:
column = np.sort(column[column.notnull()].compute())
return (column[0], column[-1]) if len(column) else (None, None)
except TypeError:
return (None, None)
else:
if dimension.nodata is not None:
column = cls.replace_value(column, dimension.nodata)
Expand Down

0 comments on commit 023ad71

Please sign in to comment.