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

Fix function to_categorical in data_utils.py #816

Merged
merged 1 commit into from
Jul 7, 2017
Merged

Fix function to_categorical in data_utils.py #816

merged 1 commit into from
Jul 7, 2017

Conversation

ArtiPyHeart
Copy link
Contributor

The asarray function of numpy will keep ndarray's shape, so the original to_categorical function cannot give right result when y is a ndarray with 2-dimension or more. A reshape function is added for changing ndarray to 1-d array. And add a warning when the input array is 3-dimension or more.

The asarray function of numpy will keep ndarray's shape, so the original to_categorical function cannot return the right answer when y is a ndarray with 2-dimension or more. A reshape function is added for changing ndarray to 1-d array. And add a warning when the input array is 3-dimension or more.
Copy link
Member

@aymericdamien aymericdamien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for adding this.

@aymericdamien aymericdamien merged commit 644ecd4 into tflearn:master Jul 7, 2017
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.

None yet

2 participants