From a77fd990a807b637b400e90c64ac1e448f84b161 Mon Sep 17 00:00:00 2001 From: haris organtzidis Date: Tue, 24 Dec 2024 19:25:01 +0200 Subject: [PATCH] filter out empty spike affects (#508) --- src/blox/connections.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blox/connections.jl b/src/blox/connections.jl index 1693ddf3..e78f9eeb 100644 --- a/src/blox/connections.jl +++ b/src/blox/connections.jl @@ -19,7 +19,7 @@ function Connector( spike_affects=Dict{Symbol, Vector{Tuple{Num, Num}}}(), learning_rule=Dict{Num, AbstractLearningRule}() ) - + filter!(x -> !isempty(last(x)), spike_affects) # Check if all weigths have NoLearningRule and if so don't keep them in the final Dict. U = narrowtype_union(learning_rule) learning_rule = U <: NoLearningRule ? Dict{Num, NoLearningRule}() : learning_rule