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 adds "percentile" as an averaging mode.
As I was updating the tests, I noticed that for the "mean" averaging mode,
nan
values are rejected by thenansum
, but they're still counted in thecounts
array, which will mean pixels that havenan
s in some of the input patches will get a downward bias. I changedcounts
to count the number of non-nan inputs per-pixel, rather than being a simple sum of the number of input patches, to address this.(This will cause a merge conflict for the visualization PR, as that one had also made changes to the
counts
array. Once one of these PRs is merged, I'll update the other, where there will probably end up being amean_counts
tracker of the number of non-nan
contributions to each pixel for the average, and a separatecounts
tracker that just tracks the number of input patches to each combined patch.)