We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
add_fallbacks!
1 parent 567fc08 commit e438f63Copy full SHA for e438f63
src/systems/problem_utils.jl
@@ -117,6 +117,7 @@ Variables as they are specified in `vars` will take priority over their `toterm`
117
function add_fallbacks!(
118
varmap::AnyDict, vars::Vector, fallbacks::Dict; toterm = default_toterm)
119
missingvars = Set()
120
+ arrvars = Set()
121
for var in vars
122
haskey(varmap, var) && continue
123
ttvar = toterm(var)
@@ -158,6 +159,7 @@ function add_fallbacks!(
158
159
if val !== nothing
160
val = val[idxs...]
161
end
162
+ push!(arrvars, arrvar)
163
else
164
val = nothing
165
@@ -170,6 +172,10 @@ function add_fallbacks!(
170
172
171
173
174
175
+ for arrvar in arrvars
176
+ varmap[arrvar] = collect(arrvar)
177
+ end
178
+
179
return missingvars
180
181
0 commit comments