Support negative drop_axis in map_blocks and map_overlap#8192
Merged
Support negative drop_axis in map_blocks and map_overlap#8192
Conversation
Collaborator
|
Can one of the admins verify this patch? |
Member
|
add to allowlist |
jrbourbeau
reviewed
Sep 28, 2021
Member
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks @grlee77! It looks like there are some code formatting issues -- see https://docs.dask.org/en/latest/develop.html#code-formatting for what formatting checks to run or how to (optionally) have these automatically run with pre-commit
Contributor
Author
Yeah, I had not installed pre-commit for this repo. It should be fixed now |
8535ab1 to
aa559ca
Compare
Member
|
I'm going to re-run the windows tests; if they pass this is ready to go. |
Member
|
Thanks @grlee77 ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows the
drop_axisargument ofmap_blocksandmap_overlapto use negative axis values in the same manner as functions in the NumPy API.This improves on #8064 which added a more informative error message on negative
drop_axis(closing #7924). This PR changes the error to only occur when the specified axis exceeds the dimensions of the output array, otherwise the axis is converted to the equivalent positive-valued axis.