Skip to content

Commit 26a595f

Browse files
committed
bdalg.connect now works with scalar inputv and outputv
1 parent 73f65df commit 26a595f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

control/bdalg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ def connect(sys, Q, inputv, outputv):
334334
interconnecting multiple systems.
335335
336336
"""
337-
inputv, outputv, Q = np.asarray(inputv), np.asarray(outputv), np.asarray(Q)
337+
inputv, outputv, Q = \
338+
np.atleast_1d(inputv), np.atleast_1d(outputv), np.atleast_1d(Q)
338339
# check indices
339340
index_errors = (inputv - 1 > sys.ninputs) | (inputv < 1)
340341
if np.any(index_errors):

0 commit comments

Comments
 (0)