Skip to content

Fix potential bugs in 'get_names'. #74

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
merged 1 commit into from
Jan 21, 2017

Conversation

arnau126
Copy link
Collaborator

Potential bugs:

  • If classes_ contains integers instead of strings the following line:
    return [c + '_' + o for o in t.classes_]
    would have crashed with:
    TypeError: cannot concatenate 'str' and 'int' objects.

  • If length of classes_ is not equals to the number of output columns the following line:
    return pd.DataFrame(stacked, columns=index)
    would have crashed with:
    Shape of passed values is (1, 3), indices imply (3, 3)
    (if, for example, there are 3 classes but only 1 output column)

@arnau126 arnau126 mentioned this pull request Jan 20, 2017
@dukebody dukebody merged commit 60fd054 into scikit-learn-contrib:master Jan 21, 2017
@dukebody
Copy link
Collaborator

Great! Thanks a lot!

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.

2 participants