Skip to content

Fix regrid! for n-dimensional arrays and mapreduce arg order#68

Open
ctessum-claude wants to merge 1 commit intoJuliaGeo:mainfrom
ctessum-claude:fix-regrid-matrix-support
Open

Fix regrid! for n-dimensional arrays and mapreduce arg order#68
ctessum-claude wants to merge 1 commit intoJuliaGeo:mainfrom
ctessum-claude:fix-regrid-matrix-support

Conversation

@ctessum-claude
Copy link
Contributor

Summary

Test plan

  • Existing vector regridding behavior unchanged (regression test included)
  • Matrix (2D) regridding works correctly with uniform field
  • 3D array regridding works correctly with uniform field
  • Full test suite passes (1242 pass, 5 pre-existing broken)

🤖 Generated with Claude Code

- 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>
@ctessum-claude ctessum-claude marked this pull request as ready for review March 1, 2026 08:09
@asinghvi17
Copy link
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 eachslice) the user to specify which dim they want to slice over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants