Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mspacek
Copy link
Contributor

@mspacek mspacek commented Apr 25, 2018

PR Summary

The shape of a 2D array is (nrows, ncols), but images are normally described by width x height (ncols, nrows). The docstring for imshow() 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
Contributor Author

mspacek commented Apr 25, 2018

Looks good in #10982. Thanks. Closing.

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.

3 participants