diff --git a/src/ModelingToolkit.jl b/src/ModelingToolkit.jl index 13b29831e5..32d52f5479 100644 --- a/src/ModelingToolkit.jl +++ b/src/ModelingToolkit.jl @@ -72,7 +72,7 @@ import Symbolics: rename, get_variables!, _solve, hessian_sparsity, ParallelForm, SerialForm, MultithreadedForm, build_function, rhss, lhss, prettify_expr, gradient, jacobian, hessian, derivative, sparsejacobian, sparsehessian, - substituter, scalarize, getparent, hasderiv, hasdiff + substituter, scalarize, getparent, hasderiv, hasdiff, Arr import DiffEqBase: @add_kwonly export independent_variables, unknowns, parameters, full_parameters, continuous_events, diff --git a/src/systems/abstractsystem.jl b/src/systems/abstractsystem.jl index 9aa4bfc92d..2ff2206d03 100644 --- a/src/systems/abstractsystem.jl +++ b/src/systems/abstractsystem.jl @@ -1112,6 +1112,7 @@ end apply_to_variables(f::F, ex) where {F} = _apply_to_variables(f, ex) apply_to_variables(f::F, ex::Num) where {F} = wrap(_apply_to_variables(f, unwrap(ex))) +apply_to_variables(f::F, ex::Arr) where {F} = wrap(_apply_to_variables(f, unwrap(ex))) function _apply_to_variables(f::F, ex) where {F} if isvariable(ex) return f(ex)