-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Added get_shape method #22510
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
Added get_shape method #22510
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers
or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
"""Return the shape of the image as | ||
tuple (numrows, numcols, channels). | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Return the shape of the image as | |
tuple (numrows, numcols, channels). | |
""" | |
""" | |
Return the shape of the image as tuple (numrows, numcols, channels). | |
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the numpydoc format for the returns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to do that but line length exceeded pep8 limit.
Please add tests for these changes. You can example generate a test image as:
and then call the methods (in separate tests) and add an |
Please do not merge the main branch into your feature branch (we prefer to rebase if there are conflicts). |
@Lumijek are you still planning to continue on this? If not, I'd pick this up so that it can move forward. |
Moved to draft until someone picks this up. |
It's been a while so I can write some tests for this. I don't know what the procedure is for picking up orphaned PRs though. |
Thanks @saranti, basically just create a new branch and a new PR referencing this one. You could |
Closing in favor of #25425 |
PR Summary
Added
get_shape
method and updated__str__
to AxesImage as specified by (#22494)PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).