Skip to content

Commit 9f9e88c

Browse files
fix tables interface
1 parent 3176683 commit 9f9e88c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tabletraits.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ function Tables.rows(A::AbstractDiffEqArray)
77
N = length(A.u[1])
88
names = [
99
:timestamp,
10-
(A.sc !== nothing && A.sc.syms !== nothing ? (A.sc.syms[i] for i in 1:N) :
10+
(A.sc !== nothing ? (states(A.sc)[i] for i in 1:N) :
1111
(Symbol("value", i) for i in 1:N))...,
1212
]
1313
types = Type[eltype(A.t), (eltype(A.u[1]) for _ in 1:N)...]
1414
else
15-
names = [:timestamp, A.sc !== nothing && A.sc.syms !== nothing ? A.sc.syms[1] : :value]
15+
names = [:timestamp, A.sc !== nothing ? states(A.sc)[1] : :value]
1616
types = Type[eltype(A.t), VT]
1717
end
1818
return AbstractDiffEqArrayRows(names, types, A.t, A.u)
@@ -31,8 +31,8 @@ struct AbstractDiffEqArrayRows{T, U}
3131
u::U
3232
end
3333
function AbstractDiffEqArrayRows(names, types, t, u)
34-
AbstractDiffEqArrayRows(names, types,
35-
Dict(nm => i for (i, nm) in enumerate(names)), t, u)
34+
AbstractDiffEqArrayRows(Symbol.(names), types,
35+
Dict(Symbol(nm) => i for (i, nm) in enumerate(names)), t, u)
3636
end
3737

3838
Base.length(x::AbstractDiffEqArrayRows) = length(x.u)

0 commit comments

Comments
 (0)