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

BUG: support nan-like null strings in [l,r]strip #26417

Merged
merged 3 commits into from May 10, 2024

Conversation

charris
Copy link
Member

@charris charris commented May 10, 2024

Backport of #26392.

Fixes #26390.

It turns out that strip has been missing from the stringdtype tests for unary and binary ufuncs and so the tests for null support were never triggered. I fixed that by adding all the strip-like functions to the tests.

Note that this adds another case where we have a goto next_step and an extra block to avoid compliation errors about jumping over variable declarations. I'd prefer to go through all of these and rewrite the loops to use for loops instead of while (N--), this just keeps things consistent with the rest of the file.

@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels May 10, 2024
@charris charris added this to the 2.0.0 release milestone May 10, 2024
("replace", (None, "A", "B")),
("rfind", (None, "A")),
("rindex", (None, "e")),
pytest.param("rjust", (None, 12), marks=unicode_bug_fail),
("rpartition", (None, "A")),
("rjust", (None, 12)),
Copy link
Member

Choose a reason for hiding this comment

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

If you remove ljust and rjust from this listing I think all the tests will pass. We didn't backport the text padding ufuncs.

NumPy 2.0.0 does not support those.
@charris charris merged commit d9f1442 into numpy:maintenance/2.0.x May 10, 2024
59 checks passed
@charris charris deleted the backport-26392 branch May 10, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants