Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid index equality check in _CPackedColumns.from_py_table() #8917

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions python/cudf/cudf/_lib/copying.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,11 @@ cdef class _CPackedColumns:

cdef _CPackedColumns p = _CPackedColumns.__new__(_CPackedColumns)

if keep_index and not input_table.index.equals(
RangeIndex(start=0, stop=len(input_table), step=1)
if keep_index and (
not isinstance(input_table.index, RangeIndex)
or input_table.index.start != 0
or input_table.index.stop != len(input_table)
or input_table.index.step != 1
):
input_table_view = input_table.view()
p.index_names = input_table._index_names
Expand Down