Skip to content

Commit

Permalink
Merge pull request #3136 from AayushSabharwal/as/array-guesses
Browse files Browse the repository at this point in the history
fix: handle array guesses in `InitializationProblem`
  • Loading branch information
ChrisRackauckas authored Oct 22, 2024
2 parents 74412cd + f531800 commit d96793b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2"
StaticArrays = "0.10, 0.11, 0.12, 1.0"
SymbolicIndexingInterface = "0.3.31"
SymbolicUtils = "3.7"
Symbolics = "6.14"
Symbolics = "6.15.2"
URIs = "1"
UnPack = "0.1, 1.0"
Unitful = "1.1"
Expand Down
6 changes: 5 additions & 1 deletion src/systems/diffeqs/abstractodesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,11 @@ function InitializationProblem{iip, specialize}(sys::AbstractODESystem,
u0T = promote_type(u0T, typeof(fullmap[eq.lhs]))
end
if u0T != Union{}
u0map = Dict(k => symbolic_type(v) == NotSymbolic() ? u0T(v) : v
u0map = Dict(k => if symbolic_type(v) == NotSymbolic() && !is_array_of_symbolics(v)
v isa AbstractArray ? u0T.(v) : u0T(v)
else
v
end
for (k, v) in u0map)
end
if neqs == nunknown
Expand Down

0 comments on commit d96793b

Please sign in to comment.