8000 fix legacy matrix issue in flatsys · python-control/python-control@c240e9b · GitHub
[go: up one dir, main page]

Skip to content

Commit c240e9 8000 b

Browse files
committed
fix legacy matrix issue in flatsys
1 parent f02b1be commit c240e9b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

control/flatsys/linflat.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 8000 line change
@@ -97,13 +97,14 @@ def __init__(self, linsys, inputs=None, outputs=None, states=None,
9797
name=name)
9898

9999
# Find the transformation to chain of integrators form
100+
# Note: store all array as ndarray, not matrix
100101
zsys, Tr = control.reachable_form(linsys)
101-
Tr = Tr[::-1, ::] # flip rows
102+
Tr = np.array(Tr[::-1, ::]) # flip rows
102103

103104
# Extract the information that we need
104-
self.F = zsys.A[0, ::-1] # input function coeffs
105-
self.T = Tr # state space transformation
106-
self.Tinv = np.linalg.inv(Tr) # compute inverse once
105+
self.F = np.array(zsys.A[0, ::-1]) # input function coeffs
106+
self.T = Tr # state space transformation
107+
self.Tinv = np.linalg.inv(Tr) # compute inverse once
107108

108109
# Compute the flat output variable z = C x
109110
Cfz = np.zeros(np.shape(linsys.C)); Cfz[0, 0] = 1

0 commit comments

Comments
 (0)
0