Skip to content

Commit

Permalink
Update models.py (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippPlank committed May 17, 2023
1 parent e39a4b6 commit 4beccfa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lava/proc/sparse/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ def get_delay_wgts_mat(weights, delays) -> spmatrix:
weights.
"""
# Can only start at 1, as delays==0 raises inefficiency warning
if np.max(delays) == 0:
return weights

weight_delay_from_1 = vstack([weights.multiply(delays == k)
for k in range(1, np.max(delays) + 1)])
# Create weight matrix at delays == 0
Expand Down

0 comments on commit 4beccfa

Please sign in to comment.