diff --git a/src/lava/proc/sparse/models.py b/src/lava/proc/sparse/models.py index 9ae3b0050..75bd43206 100644 --- a/src/lava/proc/sparse/models.py +++ b/src/lava/proc/sparse/models.py @@ -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