Skip to content

Commit

Permalink
Fix last copy_construct issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Aug 5, 2021
1 parent 71db785 commit 6727fc4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/cudf/cudf/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ def __getitem__(self, arg):
or _is_null_host_scalar(data)
):
return data
# return self._sr._from_data(
# {self._sr.name: data}, self._sr.index.take(arg))
index = self._sr.index.take(arg)
return self._sr._copy_construct(data=data, index=index)
return self._sr._from_data(
{self._sr.name: data}, index=cudf.Index(self._sr.index.take(arg))
)

def __setitem__(self, key, value):
from cudf.core.column import column
Expand Down

0 comments on commit 6727fc4

Please sign in to comment.