@@ -1265,16 +1265,15 @@ function tearing_hacks(sys, obs, unknowns, neweqs; array = true)
12651265 for (arrvar, cnt) in arr_obs_occurrences
12661266 cnt == length (arrvar) || continue
12671267 # firstindex returns 1 for multidimensional array symbolics
1268- firstind = first (eachindex (arrvar))
1268+ firstind = Tuple ( first (eachindex (arrvar) ))
12691269 scal = [arrvar[i] for i in eachindex (arrvar)]
12701270 # respect non-1-indexed arrays
12711271 # TODO : get rid of this hack together with the above hack, then remove OffsetArrays dependency
12721272 # `change_origin` is required because `Origin(firstind)(scal)` makes codegen
12731273 # try to `create_array(OffsetArray{...}, ...)` which errors.
12741274 # `term(Origin(firstind), scal)` doesn't retain the `symtype` and `size`
12751275 # of `scal`.
1276- rhs = scal
1277- rhs = change_origin (firstind, rhs)
1276+ rhs = change_origin (firstind, scal)
12781277 push! (obs_arr_eqs, arrvar ~ rhs)
12791278 end
12801279 append! (obs, obs_arr_eqs)
@@ -1284,7 +1283,7 @@ end
12841283
12851284# PART OF HACK
12861285function change_origin (origin, arr)
1287- if all (isone, Tuple ( origin) )
1286+ if all (isone, origin)
12881287 return arr
12891288 end
12901289 return Origin (origin)(arr)
0 commit comments