You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the DifferentialEquations.jl iterator, it seems that
using OrdinaryDiffEq
f_2dlinear = (du,u,p,t) -> du.=1.01u
prob = ODEProblem(f_2dlinear,rand(2,2),(0.0,1.0))
sol1 =solve(prob,Tsit5())
using IterableTables, DataFrames
df = DataFrame(sol1)
works, but
using OrdinaryDiffEq
f_2dlinear = (du,u,p,t) -> du.=1.01u
prob = ODEProblem(f_2dlinear,rand(2),(0.0,1.0))
sol1 =solve(prob,Tsit5())
using IterableTables, DataFrames
df = DataFrame(sol1)
doesn't go through the iterator in DiffEqBase, but instead uses a generic one for a matrix (since the solution is a VectorOfArray{Vector} and is thus 2 dimensional, while the first case is 3 dimensional). This seems odd because I would've assumed it would pick the more specialized iterator that's only for DESolution, and I'm not sure where the dispatch logic on this is taking place.
The text was updated successfully, but these errors were encountered:
This is a design decision in DataFrames.jl. Your second example triggers this constructor because sol2 isa AbstractMatrix (whereas that isn't true for sol1): DataFrame just generally handles matrix arguments differently.
For the DifferentialEquations.jl iterator, it seems that
works, but
doesn't go through the iterator in DiffEqBase, but instead uses a generic one for a matrix (since the solution is a
VectorOfArray{Vector}
and is thus 2 dimensional, while the first case is 3 dimensional). This seems odd because I would've assumed it would pick the more specialized iterator that's only for DESolution, and I'm not sure where the dispatch logic on this is taking place.The text was updated successfully, but these errors were encountered: