Repository navigation
WIP: Make str → bool conversion consistent - #9877
Closed
eric-wieser wants to merge 2 commits into
Closed
eric-wieser wants to merge 2 commits into
eric-wieser wants to merge 2 commits into
Conversation
Caused by string values being cast to an int first and then a bool, ie arr.astype(int).astype(bool). This causes crashes on non-numeric strings, and only accepts strings of 0 as false. Fixes numpy#9847
eric-wieser
force-pushed
the
improve-str-bool
branch
from
October 18, 2017 03:11
7b9e1d1 to
830b450
Compare
Member
|
@seberg is this covered by your work? |
Member
|
I have not looked into this, just another beehive to stab. There are corner case changes on 1.20 even, but they are not and improvement with respect to this :(. This might get seriously in the way at some point, considering how inconsistent it is. If there is any chance to prioritize this and rip off the band-aid, then I would be all for it, but it is a difficult decision to make... |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just to show what a compatibility-breaking fix for #9875 could look like. Let's leave discussions about whether this is the right thing to do in #9875.