Skip to content

Commit 3192166

Browse files
fix: don't unnecessarily construct arrays for unknowns
1 parent 71fd4b2 commit 3192166

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/structural_transformation/symbolics_tearing.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ function cse_and_array_hacks(sys, obs, subeqs, unknowns, neweqs; cse = true, arr
719719
Symbolics.shape(sym) != Symbolics.Unknown() || continue
720720
arg1 = arguments(sym)[1]
721721
cnt = get(arr_obs_occurrences, arg1, 0)
722+
cnt == 0 && continue
722723
arr_obs_occurrences[arg1] = cnt + 1
723724
end
724725
for eq in neweqs

0 commit comments

Comments
 (0)