Multi-language suite for high-performance solvers of differential equations and scientific machine learning (SciML) components. Ordinary differential equations (ODEs), stochastic differential equations (SDEs), delay differential equations (DDEs), differential-algebraic equations (DAEs), and more in Julia.
The example on https://docs.sciml.ai/DiffEqDocs/stable/features/io/ showing how to provide column names to DataFrame(::ODESolution) does not work, it errors when you provide either symbols or strings to the syms keyword, both cases it gives a method error on the getname function.
Expected behavior
The column names are [:a, :b, :c, :d]
Minimal Reproducible Example 👇
This is the example on the docs, I was also able to reproduce with my own toy example
using OrdinaryDiffEq, DataFrames
f_2dlinear = (du, u, p, t) -> du .= 1.01u;
f = ODEFunction(f_2dlinear, syms = [:a, :b, :c, :d])
prob = ODEProblem(f, rand(2, 2), (0.0, 1.0));
sol = solve(prob, Euler(); dt = 1 // 2^(4));
df = DataFrame(sol)
Error & Stacktrace ⚠️
ERROR: MethodError: no method matching getname(::Symbol)
Stacktrace:
[1] (::SciMLBase.var"#611#614"{Vector{Symbol}})(i::Int64)
@ SciMLBase ./essentials.jl:0
[2] iterate(::Base.Generator{UnitRange{Int64}, SciMLBase.var"#611#614"{Vector{Symbol}}})
@ Base ./generator.jl:47
[3] rows
@ ~/.julia/packages/SciMLBase/Dwomw/src/tabletraits.jl:31 [inlined]
[4] columns
@ ~/.julia/packages/SciMLBase/Dwomw/src/tabletraits.jl:2 [inlined]
[5] DataFrame(x::ODESolution{…}; copycols::Nothing)
@ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/other/tables.jl:57
[6] DataFrame(x::ODESolution{…})
@ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/other/tables.jl:48
[7] top-level scope
@ ~/Documents/pkpd_modeling/bug_report.jl:19
Some type information was truncated. Use `show(err)` to see complete types.
Environment (please complete the following information):
Describe the bug 🐞
The example on https://docs.sciml.ai/DiffEqDocs/stable/features/io/ showing how to provide column names to
DataFrame(::ODESolution)
does not work, it errors when you provide either symbols or strings to thesyms
keyword, both cases it gives a method error on thegetname
function.Expected behavior The column names are
[:a, :b, :c, :d]
Minimal Reproducible Example 👇
This is the example on the docs, I was also able to reproduce with my own toy example
Error & Stacktrace ⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()