Skip to content

Commit

Permalink
Merge pull request #89 from martindurant/cudf_yet_again
Browse files Browse the repository at this point in the history
A new version of libcudf
  • Loading branch information
martindurant authored Dec 19, 2024
2 parents 2a7b068 + d5274a5 commit 3223604
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/akimbo/cudf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Callable

import awkward as ak
import numpy as np

from akimbo.utils import NoAttributes

Expand Down Expand Up @@ -141,7 +142,13 @@ def str(self):
# need to find string ops within cudf
return CudfStringAccessor(self)

cast = dec_cu(libcudf.unary.cast, match=leaf)
try:
cast = dec_cu(libcudf.unary.cast, match=leaf)
except AttributeError:
def cast_inner(col, dtype):
return cudf.core.column.ColumnBase(col.data, size=len(col), dtype=np.dtype(dtype),
mask=None, offset=0, children=())
cast = dec_cu(cast_inner, match=leaf)

@property
def dt(self):
Expand Down

0 comments on commit 3223604

Please sign in to comment.