Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new version of libcudf #89

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach may eventually be the only one we use.

mask=None, offset=0, children=())
cast = dec_cu(cast_inner, match=leaf)

@property
def dt(self):
Expand Down
Loading