Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ENH: better error message for invalid axis and concatenate inputs#4926

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
charris merged 1 commit intonumpy:masterfromjuliantaylor:concatenate-error
Aug 4, 2014

Conversation

@juliantaylor
Copy link
Contributor

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.
Closesgh-4923.

@juliantaylor
Copy link
ContributorAuthor

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 errorsnp.concatenate(1,2)TypeError: object of type 'int' has no len()concatenate([1], [2])TypeError: an integer is requiredare not very unhelpful, add a new internal function that allows addingsome context to axis argument conversion failures and check for sequenceinputs in concatenate.Closesnumpygh-4923.
charris added a commit that referenced this pull requestAug 4, 2014
ENH: better error message for invalid axis and concatenate inputs
@charrischarris merged commit7e53e9b intonumpy:masterAug 4, 2014
@charris
Copy link
Member

Thanks Julian.

@juliantaylor
Copy link
ContributorAuthor

ok for 1.9?

@charris
Copy link
Member

That's up to you, but I don't think it is needed.

juliantaylor added a commit that referenced this pull requestAug 4, 2014
ENH: better error message for invalid axis and concatenate inputs
@juliantaylor
Copy link
ContributorAuthor

added, I think its a significant usability improvement of the function

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

concatenate error could be more helpful

2 participants

@juliantaylor@charris

[8]ページ先頭

©2009-2025 Movatter.jp