-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-38768: [Python] Slicing an array backwards beyond the start now in…
…cludes first item. (#39240) ### What changes are included in this PR? Minor changes in `_normalize_slice` so `start` and `stop` are both computed in a single if/else block instead of having them modified later in case of a negative `step`. ### Are these changes tested? Yes. ### Are there any user-facing changes? Fixing wrong data returned in an edge case. * Closes: #38768 Authored-by: LucasG0 <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
- Loading branch information
Showing
2 changed files
with
23 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters