Skip to content

Commit 2c2e5ec

Browse files
Use unknowns(lv) to derive Tables interface names in symbol_indexing test
MTK 11 reorders ODESystem unknowns ([y, x] in this case, not [x, y]), so the hardcoded propertynames in the test/downstream/symbol_indexing.jl Tables interface check no longer match what `propertynames(row)` and `Tables.columnnames(row)` return on the solution rows. The data columns in `Array(sol_ts)'` already follow MTK's unknowns ordering, so deriving the names list from `unknowns(lv)` keeps names and data in sync and is robust to future MTK reorderings. Restores 357/358 assertions in the `DiffEqArray Indexing Tests` testset on Julia 1/lts/pre. The remaining 1-test error is in the array-symbolic indexing test at line 103 (`sol[x .+ [y, 2y, 3y]] ≈ ...`) — passes standalone, errors only inside `@safetestset`'s isolated module; this looks like a separate Symbolics/SII module-isolation interaction that needs its own investigation. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent 51faba4 commit 2c2e5ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/downstream/symbol_indexing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ ts = 0:0.5:10
7777
sol_ts = sol(ts)
7878
@assert sol_ts isa DiffEqArray
7979
test_tables_interface(
80-
sol_ts, [:timestamp, Symbol("x(t)"), Symbol("y(t)")],
80+
sol_ts, [:timestamp; Symbol.(string.(unknowns(lv)))],
8181
hcat(ts, Array(sol_ts)')
8282
)
8383

0 commit comments

Comments
 (0)