-
-
Notifications
You must be signed in to change notification settings - Fork 236
Add NullParaemeters default. #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NullParaemeters default. #542
Conversation
| u0 = typeof(u0) <: Array{<:Pair} ? u0 : Pair.(rs.states,u0) | ||
| p = typeof(p) <: Array{<:Pair} ? p : Pair.(rs.ps,p) | ||
| function DiffEqBase.ODEProblem(rs::ReactionSystem, u0::Union{AbstractArray, Number}, tspan, p=DiffEqBase.NullParameters(), args...; kwargs...) | ||
| u0 = typeof(u0) <: Union{Array{<:Pair},DiffEqBase.NullParameters} ? u0 : Pair.(rs.states,u0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why NullParameters for u0?
|
Maybe add a test for this too? Even just the example I gave as each problem type? |
|
That would be sensible. Should we have it in Catalyst though? It is a bit confusing that so many of the tests are over there right now, but now mostly all the tests including creating problems and beyond are there, so might make it more consistent. |
|
The whole ReactionSystem should move over to Catalyst IMO, we just need like another week of refactoring the abstract system API |
|
Either location is fine! We just need to remember to include it. |
|
I'll add tests for it over at Catalyst later today. |
|
Sounds good! |
|
@TorkelE OK to merge? |
|
yes |
Should now be able to create
ReactionSystems without parameters, and create problems fro them. This should no longer yield an error:Solves SciML/Catalyst.jl#239