diff --git a/python/dask_cudf/dask_cudf/backends.py b/python/dask_cudf/dask_cudf/backends.py index c0204190957..299d6f7b119 100644 --- a/python/dask_cudf/dask_cudf/backends.py +++ b/python/dask_cudf/dask_cudf/backends.py @@ -259,9 +259,14 @@ def is_categorical_dtype_cudf(obj): try: - from dask.dataframe.dispatch import percentile_dispatch + try: + from dask.array.dispatch import percentile_lookup + except ImportError: + from dask.dataframe.dispatch import ( + percentile_dispatch as percentile_lookup, + ) - @percentile_dispatch.register((cudf.Series, cp.ndarray, cudf.Index)) + @percentile_lookup.register((cudf.Series, cp.ndarray, cudf.Index)) def percentile_cudf(a, q, interpolation="linear"): # Cudf dispatch to the equivalent of `np.percentile`: # https://numpy.org/doc/stable/reference/generated/numpy.percentile.html