diff --git a/patch/interpreter.py b/patch/interpreter.py index 24d5a66..fa9948b 100644 --- a/patch/interpreter.py +++ b/patch/interpreter.py @@ -70,7 +70,11 @@ def NetCon(self, source, target, *args, **kwargs): # Set the weight, delay and threshold independently for k, v in setters.items(): if k == "weight": - connection.weight[0] = v + if hasattr(type(v), "__iter__"): # pragma: nocover + for i, w in enumerate(v): + connection.weight[i] = w + else: + connection.weight[0] = v else: setattr(connection, k, v) # Have the NetCon reference source and target