Skip to content

ENH: Better error message for savetxt when X.ndim > 2 or X.ndim = 0 #9726

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
Sep 20, 2017

Conversation

NelleV
Copy link
Contributor

@NelleV NelleV commented Sep 20, 2017

np.savetxt does not support saving arrays of dimension 0 or higher than 2.
This pull request improves the message of the error raised.

Before this patch, the error message was something like: TypeError: Mismatch between array dtype ('float64') and format specifier ('%.18e %.18e')

savetxt does not support saving arrays of dimension 0 or higher than 2.
This pull request improves the message of the error raised.
@charris charris changed the title ENH Better error message for savetxt when X.ndim > 2 (or X.ndim = 0) ENH: Better error message for savetxt when X.ndim > 2 or X.ndim = 0 Sep 20, 2017
@charris charris merged commit e847a56 into numpy:master Sep 20, 2017
@charris
Copy link
Member

charris commented Sep 20, 2017

Thanks Nelle.

@NelleV
Copy link
Contributor Author

NelleV commented Sep 20, 2017

Thanks!

@NelleV NelleV deleted the better_error_message branch December 6, 2017 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants