Skip to content

Commit

Permalink
filter out empty spike affects
Browse files Browse the repository at this point in the history
  • Loading branch information
harisorgn committed Dec 24, 2024
1 parent 24d304f commit 4549ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/blox/connections.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4549ca1

Please sign in to comment.