From d5274a58a78549ef776788bfc2dbc2e9b71a570a Mon Sep 17 00:00:00 2001 From: mdurant Date: Thu, 12 Dec 2024 22:13:07 -0500 Subject: [PATCH] A new version of libcudf --- src/akimbo/cudf.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/akimbo/cudf.py b/src/akimbo/cudf.py index 7949f74..b5b66dd 100644 --- a/src/akimbo/cudf.py +++ b/src/akimbo/cudf.py @@ -2,6 +2,7 @@ from typing import Callable import awkward as ak +import numpy as np from akimbo.utils import NoAttributes @@ -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):