-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add a keepdims kwarg to crop and crop_by_value to keep length-1 dimensions #732
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.
Thanks for this PR @samaloney. It looks good, but keepdims
should also be added to crop_by_values
. And a test for that similar to he one you already have.
Additionally, the kwargs should be |
bae65a7
to
df6f9e6
Compare
Co-authored-by: DanRyanIrish <[email protected]>
Are you happy for me to merge this @samaloney ? |
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.
That was pleasantly easy
We should add narrative docs as well? |
It probably would be good to add a couple sentences and a code snippet at the end of this section: https://github.com/sunpy/ndcube/blob/main/docs/explaining_ndcube/slicing.rst#cropping-with-real-world-coordinates
|
Co-authored-by: Stuart Mumford <[email protected]>
Thanks @samaloney!! |
Add a
keep_dims
kwarg tocrop
andcrop_by_values
to allowing length-1 dimensions to be kept see #714