Skip to content

Commit

Permalink
Update models.py (lava-nc#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippPlank authored May 17, 2023
1 parent 77f651a commit 05d29e8
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 05d29e8

Please sign in to comment.