Skip to content

Commit 163be44

Browse files
committed
Ensure OffsetArrays dependency is removed when non-1-indexed array hack is removed
1 parent a0c9af3 commit 163be44

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/structural_transformation/symbolics_tearing.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,10 @@ function tearing_reassemble(state::TearingState, var_eq_matching,
589589
haskey(obs_arr_subs, arg1) && continue
590590
obs_arr_subs[arg1] = [arg1[i] for i in eachindex(arg1)] # e.g. p => [p[1], p[2]]
591591
index_first = eachindex(arg1)[1]
592-
obs_arr_subs[arg1] = Origin(index_first)(obs_arr_subs[arg1]) # respect non-1-indexed arrays
592+
593+
# respect non-1-indexed arrays
594+
# TODO: get rid of this hack together with the above hack, then remove OffsetArrays dependency
595+
obs_arr_subs[arg1] = Origin(index_first)(obs_arr_subs[arg1])
593596
end
594597
for i in eachindex(neweqs)
595598
neweqs[i] = fast_substitute(neweqs[i], obs_arr_subs; operator = Symbolics.Operator)

0 commit comments

Comments
 (0)