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

GH-38768: [Python] Slicing an array backwards beyond the start now includes first item. #39240

Merged

Conversation

LucasG0
Copy link
Contributor

@LucasG0 LucasG0 commented Dec 15, 2023

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.

@pitrou
Copy link
Member

pitrou commented Feb 6, 2024

@jorisvandenbossche Would you be available to review this?

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delayed review, but this looks good to me. Thanks a lot for the contribution!

@jorisvandenbossche jorisvandenbossche merged commit 00a4821 into apache:main Mar 15, 2024
12 checks passed
@jorisvandenbossche jorisvandenbossche removed the awaiting review Awaiting review label Mar 15, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label Mar 15, 2024
Copy link

After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 00a4821.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 107 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Python] Slicing an array backwards beyond the start doesn't include first item
3 participants