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

Clarify array shape vs image size in imshow() docstring#11125

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

Closed
mspacek wants to merge1 commit intomatplotlib:masterfrommspacek:patch-2

Conversation

mspacek
Copy link
Contributor

PR Summary

The shape of a 2D array is(nrows, ncols), but images are normally described by width x height(ncols, nrows). The docstring forimshow() had these a bit mixed up in my opinion. This clarifies it.

I'm not sure if the default is to use(m, n) or(n, m) to represent the shape of a 2D array. Grepping through the project reveals roughly equal use of both. I've left it as(m, n) in this PR, but maybe we should do another PR to make the notation consistent throughout the project.

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@ImportanceOfBeingErnest
Copy link
Member

The docstring of imshow is being reworked in#10982. I would suggest you comment there if it still isn't understandable.

@mspacek
Copy link
ContributorAuthor

Looks good in#10982. Thanks. Closing.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mspacek@ImportanceOfBeingErnest@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp