You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix view of VectorOfArray with heterogeneous array sizes
Fixes#453
The issue was that `view(f, :, i)` for a VectorOfArray with
heterogeneous inner array sizes returned incorrect results. The
problem was that `to_indices` uses `axes`, which is based on the
first element's size, causing views of columns with different sizes
to have incorrect dimensions.
Solution: Added special handling for `view(A, :, i)` where `i` is
an Int, to use the actual size of the specific column being viewed
rather than relying on `to_indices`.
Changes:
- Modified Base.view for AbstractVectorOfArray to handle heterogeneous
arrays by computing the correct indices based on the actual column size
- Added comprehensive tests for views of heterogeneous arrays including:
* Testing correct lengths of views
* Testing that views match regular indexing
* Testing that views can be modified
All existing tests pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments