Skip to content

Commit 10c0807

Browse files
only add SArray for Vector and Matrix
1 parent 8a09c64 commit 10c0807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/build_function.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ function _build_function(target::JuliaTarget, rhss, args...;
333333

334334
xname = gensym(:MTK)
335335

336-
arr_sys_expr = !(typeof(rhss) <: SparseMatrixCSC || eltype(rhss) <: AbstractArray) ? quote
336+
arr_sys_expr = typeof(rhss) <: Vector && typeof(rhss) <: Matrix && !(eltype(rhss) <: AbstractArray) ? quote
337337
if typeof($(fargs.args[1])) <: Union{StaticArrays.SArray,ModelingToolkit.LabelledArrays.SLArray}
338338
$xname = @SArray $arr_sys_expr
339339
convert(typeof($(fargs.args[1])),$xname)

0 commit comments

Comments
 (0)