From 7e983c74cb3dfe32788ba8b002c0f819b1158235 Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Wed, 29 Mar 2017 17:47:43 +0100 Subject: [PATCH] make this immutable again --- src/model.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model.jl b/src/model.jl index f8f7f6bb..e83426dc 100644 --- a/src/model.jl +++ b/src/model.jl @@ -127,7 +127,7 @@ graph(cap::Capacitor) = cap.graph # Recurrent Models -mutable struct Stateful <: Model +struct Stateful <: Model model state::Vector{Any} end @@ -135,7 +135,7 @@ end function (m::Stateful)(x) runrawbatched(x) do x state, y = runmodel(m.model, (m.state...,), x) - m.state = collect(state) + m.state .= state return y end end