Skip to content

Commit

Permalink
review changes and resolved circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
rgsl888prabhu committed Mar 26, 2020
1 parent 36d73f0 commit 4ee660b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/_libxx/transpose.pyx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2020, NVIDIA CORPORATION.

import cudf
from cudf.core.column.column import as_column
from cudf.utils.dtypes import is_categorical_dtype

from libcpp.memory cimport unique_ptr
Expand Down Expand Up @@ -57,7 +56,8 @@ def transpose(Table source):
if cats is not None:
result = Table(index=result._index, data=[
(name, cudf.core.column.column.build_categorical_column(
codes=as_column(col.base_data, dtype=col.dtype),
codes=cudf.core.column.column.as_column(
col.base_data, dtype=col.dtype),
mask=col.base_mask,
size=col.size,
categories=cats
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/column/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def __init__(self, dtype, mask=None, size=None, offset=0, children=()):
if size is None:
for child in children:
assert child.offset == 0
assert child.mask is None
assert child.base_mask is None
size = children[0].size
size = size - offset
if isinstance(dtype, pd.api.types.CategoricalDtype):
Expand Down

0 comments on commit 4ee660b

Please sign in to comment.