expose coordinate padding options in .pad#11213
Draft
ircwaves wants to merge 1 commit intopydata:mainfrom
Draft
Conversation
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.
Digging through the backlog with @jsignell, it seems the coord padding with NaN issue comes up every now and again. I've done enough windowed signal processing to know that changing this method's behavior will probably break things for someone, SO this change doesn't break the default type-promotion-and-fill-NaNs behavior. So, I thought I'd put up this PR that extends the change that @TomNicholas suggested as a first draft of what that might look like.
Notes
end_values,constant_values, etc) values for the coord padding parameters in the case where it is inferred from the data paddingmodeparameter.coord_prefixed versions of the data padding parameters.Example runs:
No args
da.pad(x=(5,3)):Or use the new args for linear ramped coordinates (
da.pad(x=(5, 3), constant_values=-1, coord_end_values=compute_end_values(da.indexes["x"], 5, 3), coord_mode="linear_ramp")):coord_modein.pad()#6425whats-new.rstapi.rst