Skip to content

Commit

Permalink
Update python/dask_cudf/dask_cudf/backends.py
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar authored Aug 25, 2021
1 parent 9b03113 commit f20463f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/dask_cudf/dask_cudf/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ def is_categorical_dtype_cudf(obj):

try:
try:
from dask.array.dispatch import (
percentile_lookup as percentile_dispatch,
)
from dask.array.dispatch import percentile_lookup
except ImportError:
from dask.dataframe.dispatch import percentile_dispatch
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
Expand Down

0 comments on commit f20463f

Please sign in to comment.