Fix reading of VoV when idx is past the array size#215
Merged
gipert merged 1 commit intoreleases/v1.17from Feb 22, 2026
Merged
Conversation
102a90b to
ae5d505
Compare
There was a problem hiding this comment.
Pull request overview
This pull request fixes a bug in the Vector of Vectors (VoV) reader where providing indices beyond the array size would cause errors. The fix filters out-of-range indices early in the reading process and properly handles edge cases.
Changes:
- Added early filtering of out-of-range indices in VoV reader
- Added size checks to prevent operations on empty arrays
- Added comprehensive tests for out-of-range index handling
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/lgdo/lh5/_serializers/read/vector_of_vectors.py | Implements filtering of out-of-range indices and adds safety checks for empty array operations |
| tests/lh5/test_lh5_store.py | Adds tests for partial and fully out-of-range indices to verify the fix works correctly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: aider (gpt-5.2) <aider@aider.chat>
eae68e5 to
abb6b77
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## releases/v1.17 #215 +/- ##
==================================================
+ Coverage 80.82% 80.90% +0.07%
==================================================
Files 47 47
Lines 3980 3995 +15
==================================================
+ Hits 3217 3232 +15
Misses 763 763 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
No description provided.