Skip to content

Commit b10e3e2

Browse files
committed
_update process_vector_argument to always return 1D ndarray
1 parent 1f5de6f commit b10e3e2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

control/nlsys.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,8 @@ def _process_vector_argument(arg, name, size):
25852585
val = np.array(val_list)
25862586
elif np.isscalar(arg) and size is not None: # extend scalars
25872587
val = np.ones((size, )) * arg
2588+
elif isinstance(arg, np.ndarray):
2589+
val = arg.reshape(-1) # convert to 1D array
25882590
else:
25892591
val = arg # return what we were given
25902592

0 commit comments

Comments
 (0)