Skip to content

Commit

Permalink
Use CategoricalColumn instead of build_categorical_column
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Aug 19, 2024
1 parent 4c26e7a commit 01a79f0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions python/cugraph/cugraph/structure/hypergraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)


Expand Down

0 comments on commit 01a79f0

Please sign in to comment.