Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BUG: avoid validation error for ufunc with string[python] array #62498

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

Merged

Conversation

Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Sep 29, 2025

Addresses part of #40800, i.e. fixing the plain error when calling a ufunc that does not return string values on a string array/Series.

There are also issues with the resulting dtype (if the ufunc returns object dtype, should we infer the dtype?), but that is left for another issue (that is also less pressing than fixing the raised error)

@jorisvandenbossche jorisvandenbossche added Bug Strings String extension data type and string data labels Sep 29, 2025
Comment on lines 238 to +239
else:
if self.dtype.type is str: # type: ignore[comparison-overlap]
Copy link
Member

@mroeschke mroeschke Sep 29, 2025

Choose a reason for hiding this comment

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

nit: Would be a nice if this was elif so it could be un-indented one level, but not a big deal.

@mroeschke mroeschke merged commit 52f1aec into pandas-dev:main Sep 29, 2025
42 checks passed
Copy link
Member

Copy link

lumberbot-app bot commented Sep 29, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.3.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 52f1aec9fac2f88119b5733acafcbb3efd1570a3
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #62498: BUG: avoid validation error for ufunc with string[python] array'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-62498-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #62498 on branch 2.3.x (BUG: avoid validation error for ufunc with string[python] array)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

Copy link
Member Author

Manual backport -> #62505

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@mroeschke mroeschke mroeschke approved these changes

Assignees
No one assigned
Labels
Bug Strings String extension data type and string data
Projects
None yet
Milestone
2.3.3
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /