diff --git a/src/awkward/contents/listoffsetarray.py b/src/awkward/contents/listoffsetarray.py index 030d35a344..37615f555a 100644 --- a/src/awkward/contents/listoffsetarray.py +++ b/src/awkward/contents/listoffsetarray.py @@ -2009,12 +2009,19 @@ def _to_arrow( ) def _to_cudf(self, cudf: Any, mask: Content | None, length: int): + from packaging.version import parse as parse_version cupy = Cupy.instance() index = self._offsets.raw(cupy).astype("int32") buf = cudf.core.buffer.as_buffer(index) - ind_buf = cudf.core.column.numerical.NumericalColumn( - data=buf, dtype=index.dtype, mask=None, size=len(index) - ) + + if parse_version(cupy._version.__version__) >= parse_version("24.10.00"): + ind_buf = cudf.core.column.numerical.NumericalColumn( + data=buf, dtype=index.dtype, mask=None, size=len(index) + ) + else: + ind_buf = cudf.core.column.numerical.NumericalColumn( + buf, index.dtype, None, size=len(index) + ) cont = self._content._to_cudf(cudf, None, len(self._content)) if mask is not None: m = np._module.packbits(mask, bitorder="little")