Fix regrid! for n-dimensional arrays and mapreduce arg order#68
Open
ctessum-claude wants to merge 1 commit intoJuliaGeo:mainfrom
Open
Fix regrid! for n-dimensional arrays and mapreduce arg order#68ctessum-claude wants to merge 1 commit intoJuliaGeo:mainfrom
ctessum-claude wants to merge 1 commit intoJuliaGeo:mainfrom
Conversation
- Add AbstractArray method to regrid! that iterates over slices of the first dimension, fixing MethodError when passing Matrix or higher-dim arrays (fixes JuliaGeo#67) - Fix mapreduce argument order in cell_range_extent for ExplicitPolygonGrid (fixes JuliaGeo#65): swap from mapreduce(Extents.union, GI.extent, ...) to mapreduce(GI.extent, Extents.union, ...) - Add regression tests for vector, matrix, and 3D array regridding Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
|
Hmm. I see what you mean here. Would you mind also documenting this so users don't trip over it? We may also need to break it at some point, or perhaps even allow (and require, a la |
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.
Summary
AbstractArraymethod toregrid!that iterates over slices of the first dimension, enabling Matrix and higher-dimensional array inputs as promised by the docstring. The existingAbstractVector/DenseVectormethods remain unchanged and take dispatch priority for vector inputs.mapreduceargument order incell_range_extentforExplicitPolygonGrid{<: GO.Planar}frommapreduce(Extents.union, GI.extent, ...)tomapreduce(GI.extent, Extents.union, ...)(the mapping function should come first, the reducing function second).Test plan
🤖 Generated with Claude Code