Skip to content

Commit

Permalink
Avoid index equality check in from_py_table
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbluca committed Jul 30, 2021
1 parent 8e9f0aa commit 5474018
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit 5474018

Please sign in to comment.