Skip to content

Commit

Permalink
Remove build_categorical_column in favor of CategoricalColumn constru…
Browse files Browse the repository at this point in the history
…ctor (rapidsai#16617)

`build_categorical_column` was largely redundant with the CategoricalColumn constructor, so in the spirit of having One Way to Do Things, replacing the former with the latter.

There is usage of `build_categorical_column` in cugraph that has been replaced in rapidsai/cugraph#4618

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Richard (Rick) Zamora (https://github.com/rjzamora)
  - GALI PREM SAGAR (https://github.com/galipremsagar)

URL: rapidsai#16617
  • Loading branch information
mroeschke authored Aug 28, 2024
1 parent 872e01e commit dba6c1f
Show file tree
Hide file tree
Showing 16 changed files with 284 additions and 320 deletions.
13 changes: 0 additions & 13 deletions python/cudf/cudf/core/_internals/where.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,6 @@ def _check_and_cast_columns_with_other(
return _normalize_categorical(source_col.astype(common_dtype), other)


def _make_categorical_like(result, column):
if isinstance(column, cudf.core.column.CategoricalColumn):
result = cudf.core.column.build_categorical_column(
categories=column.categories,
codes=result,
mask=result.base_mask,
size=result.size,
offset=result.offset,
ordered=column.ordered,
)
return result


def _can_cast(from_dtype, to_dtype):
"""
Utility function to determine if we can cast
Expand Down
1 change: 0 additions & 1 deletion python/cudf/cudf/core/column/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from cudf.core.column.column import (
ColumnBase,
as_column,
build_categorical_column,
build_column,
column_empty,
column_empty_like,
Expand Down
Loading

0 comments on commit dba6c1f

Please sign in to comment.