Fixed python2 libsvm call with unicode kernel#7064
Merged
GaelVaroquaux merged 1 commit intoscikit-learn:masterfrom Aug 1, 2016
Merged
Fixed python2 libsvm call with unicode kernel#7064GaelVaroquaux merged 1 commit intoscikit-learn:masterfrom
GaelVaroquaux merged 1 commit intoscikit-learn:masterfrom
Conversation
Member
|
can you add a test? |
Contributor
Author
|
I added a test. Without my patch to svm/base.py the test will fail. I also extended the commit to ensure that bytes are properly cast to unicode in python3. |
Member
|
Your tests are failing under travis. I am not sure why (master is not failing). Could you rebase on master and force push, to see if that fixes the problem. Thanks! |
Member
I cleared the Travis cache for this PR and this seems to have fixed it. |
Added corresponding test.
395e9cc to
d8db108
Compare
Contributor
Author
|
I went back and rebased. Nothing seemed broken. I also squashed the two separate commits into one. |
Member
|
LGTM! Merging |
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.
What does this implement/fix? Explain your changes.
In python2 with from future import absolute_import, division, print_function, unicode_literals I ran across an error when running the line:
When running the line
I received the error:
I simply added a check for this case before the offending call, which should prevent it from occurring again.
Any other comments?