Skip to content

Commit

Permalink
slice edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-b-miller committed Jun 25, 2024
1 parent 9d70bb2 commit 78fe267
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/cudf/cudf/pylibcudf_tests/test_string_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def test_slice_column(
pa_col, plc_col, pa_starts_col, plc_starts_col, pa_stops_col, plc_stops_col
):
def slice_string(st, start, stop):
if stop < 0:
stop = len(st)
return st[start:stop] if st is not None else None

expected = pa.array(
Expand Down

0 comments on commit 78fe267

Please sign in to comment.