GEOPY-2786: add a mthode to access the reshaped values in geoh5py for 2d grid and 3dgrid#863
Open
MatthieuCMira wants to merge 4 commits intodevelopfrom
Open
GEOPY-2786: add a mthode to access the reshaped values in geoh5py for 2d grid and 3dgrid#863MatthieuCMira wants to merge 4 commits intodevelopfrom
MatthieuCMira wants to merge 4 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds convenience APIs on Grid2D and BlockModel to retrieve cell-associated data reshaped into grid-aligned numpy arrays, with accompanying unit tests.
Changes:
- Add
shaped_data_values(...)toGrid2DandBlockModel. - Add shared
_get_unique_data(...)helper onGridObjectto resolve a uniqueDataentity and validate its association. - Add tests covering reshaping behavior and basic error cases.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
geoh5py/objects/grid_object.py |
Introduces _get_unique_data helper for resolving/validating Data references. |
geoh5py/objects/grid2d.py |
Adds Grid2D.shaped_data_values returning 2D-shaped cell data (with V-axis flip). |
geoh5py/objects/block_model.py |
Adds BlockModel.shaped_data_values returning 3D-shaped cell data using Fortran ordering. |
tests/grid_2d_test.py |
Adds tests for Grid2D.shaped_data_values and error handling. |
tests/block_model_test.py |
Adds test for BlockModel.shaped_data_values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #863 +/- ##
===========================================
+ Coverage 91.14% 91.18% +0.03%
===========================================
Files 115 115
Lines 10332 10353 +21
Branches 1911 1915 +4
===========================================
+ Hits 9417 9440 +23
+ Misses 490 487 -3
- Partials 425 426 +1
🚀 New features to boost your workflow:
|
domfournier
reviewed
Mar 27, 2026
added 2 commits
March 27, 2026 11:06
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.
GEOPY-2786 - add a mthode to access the reshaped values in geoh5py for 2d grid and 3dgrid
add a method on grid2d and block model to access shaped data