Skip to content

Commit 8e6a853

Browse files
authored
Do not overwrite np = numpy with an array size.
The function failed to be called with python3
1 parent 7b07af3 commit 8e6a853

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

control/robust.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def h2syn(P,nmeas,ncon):
9090

9191
n = np.size(P.A,0)
9292
m = np.size(P.B,1)
93-
np = np.size(P.C,0)
94-
out = sb10hd(n,m,np,ncon,nmeas,P.A,P.B,P.C,P.D)
93+
mp = np.size(P.C,0)
94+
out = sb10hd(n,m,mp,ncon,nmeas,P.A,P.B,P.C,P.D)
9595
Ak = out[0]
9696
Bk = out[1]
9797
Ck = out[2]
@@ -150,9 +150,9 @@ def hinfsyn(P,nmeas,ncon):
150150
job = 3
151151
n = np.size(P.A,0)
152152
m = np.size(P.B,1)
153-
np = np.size(P.C,0)
153+
mp = np.size(P.C,0)
154154
gamma = 1.e100
155-
out = sb10ad(job,n,m,np,ncon,nmeas,gamma,P.A,P.B,P.C,P.D)
155+
out = sb10ad(job,n,m,mp,ncon,nmeas,gamma,P.A,P.B,P.C,P.D)
156156
gam = out[0]
157157
Ak = out[1]
158158
Bk = out[2]

0 commit comments

Comments
 (0)