Skip to content

Commit 092b76c

Browse files
committed
fix statefbk docstring and input array type
1 parent 51c797e commit 092b76c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

control/statefbk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def place(A, B, p):
120120
raise ControlDimension(err_str)
121121

122122
# Convert desired poles to numpy array
123-
placed_eigs = np.array(p)
123+
placed_eigs = np.atleast_1d(np.squeeze(np.asarray(p)))
124124

125125
result = place_poles(A_mat, B_mat, placed_eigs, method='YT')
126126
K = result.gain_matrix
@@ -201,7 +201,7 @@ def place_varga(A, B, p, dtime=False, alpha=None):
201201

202202
# Compute the system eigenvalues and convert poles to numpy array
203203
system_eigs = np.linalg.eig(A_mat)[0]
204-
placed_eigs = np.array(p)
204+
placed_eigs = np.atleast_1d(np.squeeze(np.asarray(p)))
205205

206206
# Need a character parameter for SB01BD
207207
if dtime:
@@ -292,8 +292,8 @@ def lqe(A, G, C, QN, RN, NN=None):
292292
293293
Examples
294294
--------
295-
>>> K, P, E = lqe(A, G, C, QN, RN)
296-
>>> K, P, E = lqe(A, G, C, QN, RN, NN)
295+
>>> L, P, E = lqe(A, G, C, QN, RN)
296+
>>> L, P, E = lqe(A, G, C, QN, RN, NN)
297297
298298
See Also
299299
--------

0 commit comments

Comments
 (0)