Skip to content

Conversation

ValentinKaisermayer
Copy link
Contributor

Re-adds concrete type promotion for u0, otherwise solvers like Rosenbrock23 throw an exception. This was present in v8.5.2. Parameters can have mixed types, though.

src/utils.jl Outdated
vs
else
C = foldl((t, elem)->promote_type(t, eltype(elem)), vs; init=typeof(first(vs)))
convert(Vector{C}, vs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not always a vector, or at least, not always supposed to be a vector. I think you want to instead just broadcast a convert to C.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, it could be a Tuple, this seems to be missing from the test then.

@ChrisRackauckas ChrisRackauckas merged commit f0e4f7e into SciML:master Mar 22, 2022
@ValentinKaisermayer ValentinKaisermayer deleted the patch-concrete_init branch March 22, 2022 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants