Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Jul 4, 2024
1 parent 43cf72b commit 507087b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@ def lazy_isinstance(obj, class_or_tuple):
obj_mod_name = obj.__module__.split('.')[0]
for cls in class_or_tuple:
mod_name, _, attr_name = cls.partition(':')
if obj_mod_name != mod_name.split(".")[0]:
if not obj_mod_name.startswith(mod_name.split(".")[0]):
continue
mod = importlib.import_module(mod_name)
if isinstance(obj, functools.reduce(getattr, attr_name.split('.'), mod)):
Expand Down
3 changes: 2 additions & 1 deletion holoviews/operation/datashader.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
Dataset,
PandasInterface,
XArrayInterface,
cuDFInterface,
)
from ..core.util import (
cast_array_to_int64,
Expand Down Expand Up @@ -318,7 +319,7 @@ def get_agg_data(cls, obj, category=None):
if category and df[category].dtype.name != 'category':
df[category] = df[category].astype('category')

is_custom = lazy_isinstance(path, ("dask.dataframe:DataFrame", "cudf:DataFrame", "cudf:Series"))
is_custom = lazy_isinstance(df, "dask.dataframe:DataFrame") or cuDFInterface.applies(df)
if any((not is_custom and len(df[d.name]) and isinstance(df[d.name].values[0], cftime_types)) or
df[d.name].dtype.kind in ["M", "u"] for d in (x, y)):
df = df.copy()
Expand Down

0 comments on commit 507087b

Please sign in to comment.