Skip to content

Commit

Permalink
Merge pull request #3234 from SebastianM-C/smc/arr
Browse files Browse the repository at this point in the history
Fix type promotion in `InitializationProblem`s with vectors in the `u0map`
  • Loading branch information
ChrisRackauckas authored Nov 26, 2024
2 parents 14a7239 + 3988496 commit 42d4d63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/systems/diffeqs/abstractodesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,7 @@ function InitializationProblem{iip, specialize}(sys::AbstractODESystem,
u0T = promote_type(u0T, typeof(fullmap[eq.lhs]))
end
if u0T != Union{}
u0T = eltype(u0T)
u0map = Dict(k => if symbolic_type(v) == NotSymbolic() && !is_array_of_symbolics(v)
v isa AbstractArray ? u0T.(v) : u0T(v)
else
Expand Down

0 comments on commit 42d4d63

Please sign in to comment.