Port v3 RaggedEnd for per-column end in ragged arrays#555
Closed
ChrisRackauckas-Claude wants to merge 3 commits intoSciML:masterfrom
Closed
Port v3 RaggedEnd for per-column end in ragged arrays#555ChrisRackauckas-Claude wants to merge 3 commits intoSciML:masterfrom
ChrisRackauckas-Claude wants to merge 3 commits intoSciML:masterfrom
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements the v3 RaggedEnd/RaggedRange mechanism in the ragged sublibrary so that `r[end, i]` returns the last element of column `i` (not the global max). This matches the original v3 VectorOfArray ragged behavior exactly: r = RaggedVectorOfArray([[1.0, 2.0], [3.0, 4.0, 5.0]]) r[end, 1] # 2.0 (last of column 1) r[end, 2] # 5.0 (last of column 2) r[1:end, 1] # [1.0, 2.0] r[1:end, 2] # [3.0, 4.0, 5.0] `lastindex(r, d)` returns a `RaggedEnd` sentinel for leading dimensions, which is resolved per-column at indexing time via `_resolve_ragged`. Addresses feedback from @JoshuaLampert. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the partial reimplementation with the COMPLETE v3 vector_of_array.jl code, mechanically transformed: - VectorOfArray → RaggedVectorOfArray - DiffEqArray → RaggedDiffEqArray - AbstractVectorOfArray → AbstractRaggedVectorOfArray - AbstractDiffEqArray → AbstractRaggedDiffEqArray This preserves ALL v3 behavior exactly: - A[i] returns the i-th inner array (not scalar) - A[:, i] returns inner array without zero-padding - RaggedEnd for per-column `end` resolution - Iteration over inner arrays - Full broadcasting, copy, zero, similar, fill!, push!, etc. Tests are the complete v3 test suite (basic_indexing + interface_tests) transformed with same type renames, plus new tests for interp/dense, conversion, SymbolicIndexingInterface, and type hierarchy. 430 tests pass. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Implements the v3
RaggedEnd/RaggedRangemechanism in the ragged sublibrary so thatr[end, i]returns the last element of columni(not the global max). This matches the original v3VectorOfArrayragged behavior exactly:lastindex(r, d)returns aRaggedEndsentinel for leading dimensions, which is resolved per-column at indexing time via_resolve_ragged.Addresses feedback from @JoshuaLampert in #547.
235 ragged tests pass.