ENH: better error message for invalid axis and concatenate inputs#4926
Merged
charris merged 1 commit intonumpy:masterfrom Aug 4, 2014
Merged
ENH: better error message for invalid axis and concatenate inputs#4926charris merged 1 commit intonumpy:masterfrom
charris merged 1 commit intonumpy:masterfrom
Conversation
Contributor
Author
|
if we put the functions in the header or the API we could also use it for the ufunc axis arguments. There are probably also a few more places to put this. the concatenate error message as confused me alot when I started using numpy, just remembered the pain with the report :) so I'd like to put it into 1.9 so a non API approach is probably better. |
the old errors np.concatenate(1,2) TypeError: object of type 'int' has no len() concatenate([1], [2]) TypeError: an integer is required are not very unhelpful, add a new internal function that allows adding some context to axis argument conversion failures and check for sequence inputs in concatenate. Closes numpygh-4923.
charris
added a commit
that referenced
this pull request
Aug 4, 2014
ENH: better error message for invalid axis and concatenate inputs
Member
|
Thanks Julian. |
Contributor
Author
|
ok for 1.9? |
Member
|
That's up to you, but I don't think it is needed. |
8000
juliantaylor
added a commit
that referenced
this pull request
Aug 4, 2014
ENH: better error message for invalid axis and concatenate inputs
Contributor
Author
|
added, I think its a significant usability improvement of the function |
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.
the old errors
np.concatenate(1,2)
TypeError: object of type 'int' has no len()
concatenate([1], [2])
TypeError: an integer is required
are not very helpful, add a new internal function that allows adding
some context to axis argument conversion failures and check for sequence
inputs in concatenate.
Closes gh-4923.