From 01a79f0ad353602133f74065de33d1dd0621eb81 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:25:19 -0700 Subject: [PATCH] Use CategoricalColumn instead of build_categorical_column --- python/cugraph/cugraph/structure/hypergraph.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python/cugraph/cugraph/structure/hypergraph.py b/python/cugraph/cugraph/structure/hypergraph.py index b52fef4dcfc..d93f679d337 100644 --- a/python/cugraph/cugraph/structure/hypergraph.py +++ b/python/cugraph/cugraph/structure/hypergraph.py @@ -580,14 +580,16 @@ def _create_direct_edges( def _str_scalar_to_category(size, val): - return cudf.core.column.build_categorical_column( - categories=cudf.core.column.as_column([val], dtype="str"), - codes=cudf.core.column.as_column(0, length=size, dtype=np.int32), - mask=None, + return cudf.core.column.CategoricalColumn( + data=None, size=size, + dtype=cudf.CategoricalDtype( + categories=cudf.core.column.as_column([val], dtype="str"), ordered=False + ), + mask=None, offset=0, null_count=0, - ordered=False, + children=cudf.core.column.as_column(0, length=size, dtype=np.int32), )