From e44240ff63a0eae590ba25653ad1b164714585aa Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sun, 23 May 2021 16:53:39 -0400 Subject: [PATCH] Hotfix https://github.com/SciML/SciMLBase.jl/pull/62 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ```julia using DifferentialEquations, Plots function SIR!(du,u,pars,t) S, I, R = u β, γ = pars dS = -β*S*I dI = β*S*I - γ*I dR = γ*I du .= [dS, dI, dR] end u0 = [0.97, 0.03, 0.0] params = [0.5, 0.15] tspan = [0.0, 50.0] prob = ODEProblem(SIR!, u0, tspan, params); sol = solve(prob, Tsit5(), saveat = 0:0.5:50, reltol = 1e-4, abstol = 1e-6) plot(sol) ``` --- Project.toml | 2 +- src/solutions/solution_interface.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 8815e0fde..bcd1d6521 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SciMLBase" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" authors = ["Chris Rackauckas and contributors"] -version = "1.13.3" +version = "1.13.4" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" diff --git a/src/solutions/solution_interface.jl b/src/solutions/solution_interface.jl index 0534e2bd4..962dbf423 100644 --- a/src/solutions/solution_interface.jl +++ b/src/solutions/solution_interface.jl @@ -344,7 +344,7 @@ function diffeq_to_arrays(sol,plot_analytic,denseplot,plotdensity,tspan,axis_saf # Plot for sparse output: use the timeseries itself if sol.tslocation == 0 plott = sol.t - plot_timeseries = DiffEqArray(sol.t, sol.u) + plot_timeseries = DiffEqArray(sol.u, sol.t) if plot_analytic plot_analytic_timeseries = sol.u_analytic else @@ -357,7 +357,7 @@ function diffeq_to_arrays(sol,plot_analytic,denseplot,plotdensity,tspan,axis_saf plott = collect(densetspacer(tspan[1],tspan[2],plotdensity)) end - plot_timeseries = DiffEqArray(sol.t[start_idx:end_idx], sol.u[start_idx:end_idx]) + plot_timeseries = sol.u[start_idx:end_idx] if plot_analytic plot_analytic_timeseries = sol.u_analytic[start_idx:end_idx] else