10000 Add space after commas · NickThomasMain/python-control@df71ed6 · GitHub
[go: up one dir, main page]

Skip to content

Commit df71ed6

Browse files
committed
Add space after commas
1 parent 220ace3 commit df71ed6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

control/modelsimp.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -667,21 +667,21 @@ def markov(*args, m=None, transpose=False, dt=None, truncate=False):
667667

668668
# Set up the full problem
669669
# Create matrix of (shifted) inputs
670-
UUT = np.zeros((p*m,(l)))
670+
UUT = np.zeros((p*m, l))
671671
for i in range(m):
672672
# Shift previous column down and keep zeros at the top
673-
UUT[i*p:(i+1)*p,i:] = Umat[:,:l-i]
673+
UUT[i*p:(i+1)*p, i:] = Umat[:, :l-i]
674674

675675
# Truncate first t=0 or t=m time steps, transpose the problem for lsq
676-
YY = Ymat[:,t:].T
677-
UU = UUT[:,t:].T
676+
YY = Ymat[:, t:].T
677+
UU = UUT[:, t:].T
678678

679679
# Solve for the Markov parameters from YY = UU @ H.T
680680
HT, _, _, _ = np.linalg.lstsq(UU, YY, rcond=None)
681681
H = HT.T/dt # scaling
682682

683-
H = H.reshape(q,m,p) # output, time*input -> output, time, input
684-
H = H.transpose(0,2,1) # output, input, time
683+
H = H.reshape(q, m, p) # output, time*input -> output, time, input
684+
H = H.transpose(0, 2, 1) # output, input, time
685685

686686
# for siso return a 1D array instead of a 3D array
687687
if q == 1 and p == 1:

0 commit comments

Comments
 (0)
0