8000 [MRG+2] don't compare things that can be arrays to strings. by amueller · Pull Request #5668 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG+2] don't compare things that can be arrays to strings. #5668

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

amueller
Copy link
Member
@amueller amueller commented Nov 2, 2015

Fixes the remainder of #5413.
This will break on future numpy!

@amueller amueller added this to the 0.17 milestone Nov 2, 2015
@GaelVaroquaux GaelVaroquaux changed the title MRG don't compare things that can be arrays to strings. [MRG+1] don't compare things that can be arrays to strings. Nov 3, 2015
@GaelVaroquaux
Copy link
Member

LGTM. +1 for merge.

@MechCoder
Copy link
Member

Sorry for being nitpicky, but I think this can be refactored in _check_reg_targets since that is where the input checks are done.

@amueller
Copy link
Member Author
amueller commented Nov 3, 2015

@MechCoder don't understand. These are different ifs, right?

@amueller
Copy link
Member Author
amueller commented Nov 3, 2015

we could maybe do a string_equal(X, "bla") that does isinstance(X, string) and X == "bla"

@amueller amueller force-pushed the multioutput_string_comparison branch from 058e919 to 550b228 Compare November 3, 2015 19:28
@MechCoder
Copy link
Member

lgtm

@MechCoder MechCoder changed the title [MRG+1] don't compare things that can be arrays to strings. [MRG+2] don't compare things that can be arrays to strings. Nov 3, 2015
amueller added a commit that referenced this pull request Nov 3, 2015
[MRG+2] don't compare things that can be arrays to strings.
@amueller amueller merged commit f9b92cb into scikit-learn:master Nov 3, 2015
@amueller
Copy link
Member Author
amueller commented Nov 3, 2015

backported to 0.17 as 88e86f3

@amueller amueller deleted the multioutput_string_comparison branch May 19, 2017 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0