File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -511,15 +511,16 @@ function (f::Initial)(x)
511511 end
512512 # don't double wrap
513513 iscall (x) && operation (x) isa Initial && return x
514- result = if symbolic_type (x) == ArraySymbolic ()
515- term (f, x; type = symtype (x), shape = SU. shape (x))
516- elseif iscall (x) && operation (x) == getindex
514+ sh = SU. shape (x)
515+ result = if SU. is_array_shape (sh)
516+ term (f, x; type = symtype (x), shape = sh)
517+ elseif iscall (x) && operation (x) === getindex
517518 # instead of `Initial(x[1])` create `Initial(x)[1]`
518519 # which allows parameter indexing to handle this case automatically.
519520 arr = arguments (x)[1 ]
520521 f (arr)[arguments (x)[2 : end ]. .. ]
521522 else
522- term (f, x; type = symtype (x), shape = SU . shape (x) )
523+ term (f, x; type = symtype (x), shape = sh )
523524 end
524525 # the result should be a parameter
525526 result = toparam (result)
You can’t perform that action at this time.
0 commit comments