diff --git a/holoviews/core/util.py b/holoviews/core/util.py index 04543cfdef..044e20ad38 100644 --- a/holoviews/core/util.py +++ b/holoviews/core/util.py @@ -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)): diff --git a/holoviews/operation/datashader.py b/holoviews/operation/datashader.py index b8b20821b2..d75c05ccca 100644 --- a/holoviews/operation/datashader.py +++ b/holoviews/operation/datashader.py @@ -35,6 +35,7 @@ Dataset, PandasInterface, XArrayInterface, + cuDFInterface, ) from ..core.util import ( cast_array_to_int64, @@ -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()