Skip to content

Fix reading of VoV when idx is past the array size#215

Merged
gipert merged 1 commit intoreleases/v1.17from
vov-culling-fix
Feb 22, 2026
Merged

Fix reading of VoV when idx is past the array size#215
gipert merged 1 commit intoreleases/v1.17from
vov-culling-fix

Conversation

@gipert
Copy link
Copy Markdown
Member

@gipert gipert commented Feb 22, 2026

No description provided.

@gipert gipert changed the base branch from main to releases/v1.17 February 22, 2026 17:05
@gipert gipert marked this pull request as ready for review February 22, 2026 17:06
@gipert gipert requested a review from Copilot February 22, 2026 17:07
@gipert gipert added the bug Something isn't working label Feb 22, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.90%. Comparing base (675d6b7) to head (abb6b77).
⚠️ Report is 2 commits behind head on releases/v1.17.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gipert gipert merged commit c69488a into releases/v1.17 Feb 22, 2026
15 checks passed
@gipert gipert deleted the vov-culling-fix branch February 22, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants