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

make NA behavior for cast to string and cast to unicode match #89

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

ngoldbaum
Copy link
Member

This fixes an oversight Warren pointed out on slack. Before we were silently converting NA to an empty string when casting from a string dtype with an na object set to one without. Now we match the behavior of the unicode cast and use the string representation of the NA object. This is lossy, so it's an unsafe cast.

I also added tests for these semantics.

@ngoldbaum ngoldbaum merged commit b5b7ca2 into numpy:main Sep 26, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant