Repository navigation
Fix return of get_indices_block - #1713
Merged
Merged
Conversation
Make the function to always return an array of integers for the cells that belong to the specified block, instead of returning a tuple with just a single array. Fixes #1606
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1713 +/- ##
==========================================
- Coverage 86.03% 81.48% -4.56%
==========================================
Files 419 419
Lines 54811 54862 +51
Branches 5204 5207 +3
==========================================
- Hits 47155 44702 -2453
- Misses 6260 8765 +2505
+ Partials 1396 1395 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fix function for 1D mesh that wasn't working properly. Improve error messages in function: raise better errors than just `AssertError`s and improve messages. Avoid overwriting the `p0` and `p1` arrays in-place if they are not provided in the right order (west-south-bottom and then east-north-top).
Don't unpack the first element of the output of the function call, just use the entire set of indices to slice arrays.
Add the new warning class to the API Reference.
santisoler
marked this pull request as ready for review
October 15, 2025 19:53
This was referenced Jan 21, 2026
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
Make the
get_indices_blockfunction to always return an array of integers for the cells that belong to the specified block, instead of returning a tuple with just a single array. Improve its implementation. Fix it for 1D mesh since it wasn't working properly. Improve error messages: raise better errors than justAssertErrors and improve messages. Avoid overwriting thep0andp1arrays in-place if they are not provided in the right order (west-south-bottom and then east-north-top). Add tests for the function. Update usage of the function across tests and examples. This introduces a backward incompatible change.PR Checklist
expect style.
to a Pull Request
@simpeg/simpeg-developerswhen ready for review.Reference issue
Fixes #1606
What does this implement/fix?
Additional information