Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit258e28e

Browse files
committed
fix unit test issue (change in error message)
1 parent8c6565b commit258e28e

File tree

7 files changed

+23
-22
lines changed

7 files changed

+23
-22
lines changed

‎control/mateqn.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def lyap(A, Q, C=None, E=None, method=None):
109109
method=_slycot_or_scipy(method)
110110
ifmethod=='slycot':
111111
ifsb03mdisNone:
112-
raiseControlSlycot("Can't findSlycot module 'sb03md'")
112+
raiseControlSlycot("Can't findslycot module 'sb03md'")
113113
ifsb04mdisNone:
114-
raiseControlSlycot("Can't findSlycot module 'sb04md'")
114+
raiseControlSlycot("Can't findslycot module 'sb04md'")
115115

116116
# Reshape input arrays
117117
A=np.array(A,ndmin=2)
@@ -171,7 +171,7 @@ def lyap(A, Q, C=None, E=None, method=None):
171171
fromslycotimportsg03ad
172172

173173
exceptImportError:
174-
raiseControlSlycot("Can't findSlycot module 'sg03ad'")
174+
raiseControlSlycot("Can't findslycot module 'sg03ad'")
175175

176176
# Solve the generalized Lyapunov equation by calling Slycot
177177
# function sg03ad
@@ -237,11 +237,11 @@ def dlyap(A, Q, C=None, E=None, method=None):
237237
ifmethod=='slycot':
238238
# Make sure we have access to the right slycot routines
239239
ifsb03mdisNone:
240-
raiseControlSlycot("Can't findSlycot module 'sb03md'")
240+
raiseControlSlycot("Can't findslycot module 'sb03md'")
241241
ifsb04qdisNone:
242-
raiseControlSlycot("Can't findSlycot module 'sb04qd'")
242+
raiseControlSlycot("Can't findslycot module 'sb04qd'")
243243
ifsg03adisNone:
244-
raiseControlSlycot("Can't findSlycot module 'sg03ad'")
244+
raiseControlSlycot("Can't findslycot module 'sg03ad'")
245245

246246
# Reshape input arrays
247247
A=np.array(A,ndmin=2)
@@ -404,12 +404,12 @@ def care(A, B, Q, R=None, S=None, E=None, stabilizing=True, method=None,
404404
try:
405405
fromslycotimportsb02md
406406
exceptImportError:
407-
raiseControlSlycot("Can't findSlycot module 'sb02md'")
407+
raiseControlSlycot("Can't findslycot module 'sb02md'")
408408

409409
try:
410410
fromslycotimportsb02mt
411411
exceptImportError:
412-
raiseControlSlycot("Can't findSlycot module 'sb02mt'")
412+
raiseControlSlycot("Can't findslycot module 'sb02mt'")
413413

414414
# Solve the standard algebraic Riccati equation by calling Slycot
415415
# functions sb02mt and sb02md
@@ -450,7 +450,7 @@ def care(A, B, Q, R=None, S=None, E=None, stabilizing=True, method=None,
450450
try:
451451
fromslycotimportsg02ad
452452
exceptImportError:
453-
raiseControlSlycot("Can't findSlycot module'sg02ad'")
453+
raiseControlSlycot("Can't findslycot module sg02ad")
454454

455455
# Solve the generalized algebraic Riccati equation by calling the
456456
# Slycot function sg02ad
@@ -569,7 +569,7 @@ def dare(A, B, Q, R, S=None, E=None, stabilizing=True, method=None,
569569
try:
570570
fromslycotimportsg02ad
571571
exceptImportError:
572-
raiseControlSlycot("Can't findSlycot module'sg02ad'")
572+
raiseControlSlycot("Can't findslycot module sg02ad")
573573

574574
# Initialize optional matrices
575575
S=np.zeros((n,m))ifSisNoneelsenp.array(S,ndmin=2)

‎control/modelsimp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def balanced_reduction(sys, orders, method='truncate', alpha=None):
295295
ValueError
296296
If `method` is not 'truncate' or 'matchdc'.
297297
ImportError
298-
IfSlycot routine ab09ad, ab09md, or ab09nd is not found.
298+
Ifslycot routine ab09ad, ab09md, or ab09nd is not found.
299299
ValueError
300300
If there are more unstable modes than any value in orders.
301301
@@ -314,12 +314,12 @@ def balanced_reduction(sys, orders, method='truncate', alpha=None):
314314
fromslycotimportab09ad,ab09md
315315
exceptImportError:
316316
raiseControlSlycot(
317-
"can't findSlycot subroutine ab09md or ab09ad")
317+
"can't findslycot subroutine ab09md or ab09ad")
318318
elifmethod=='matchdc':
319319
try:
320320
fromslycotimportab09nd
321321
exceptImportError:
322-
raiseControlSlycot("can't findSlycot subroutine ab09nd")
322+
raiseControlSlycot("can't findslycot subroutine ab09nd")
323323

324324
# Check for ss system object, need a utility for this?
325325

‎control/robust.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def h2syn(P, nmeas, ncon):
3535
Raises
3636
------
3737
ImportError
38-
IfSlycot routine sb10hd is not loaded.
38+
Ifslycot routine sb10hd is not loaded.
3939
4040
See Also
4141
--------

‎control/statefbk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def place_varga(A, B, p, dtime=False, alpha=None):
170170
try:
171171
fromslycotimportsb01bd
172172
exceptImportError:
173-
raiseControlSlycot("can't find slycot module'sb01bd'")
173+
raiseControlSlycot("can't find slycot module sb01bd")
174174

175175
# Convert the system inputs to NumPy arrays
176176
A_mat=np.array(A)
@@ -1200,7 +1200,7 @@ def gram(sys, type):
12001200
# Compute Gramian by the Slycot routine sb03md
12011201
# make sure Slycot is installed
12021202
ifsb03mdisNone:
1203-
raiseControlSlycot("can't find slycot module'sb03md'")
1203+
raiseControlSlycot("can't find slycot module sb03md")
12041204
iftype=='c':
12051205
tra='T'
12061206
C=-sys.B @sys.B.T
@@ -1218,7 +1218,7 @@ def gram(sys, type):
12181218
eliftype=='cf'ortype=='of':
12191219
# Compute Cholesky factored Gramian from Slycot routine sb03od
12201220
ifsb03odisNone:
1221-
raiseControlSlycot("can't find slycot module'sb03od'")
1221+
raiseControlSlycot("can't find slycot module sb03od")
12221222
tra='N'
12231223
n=sys.nstates
12241224
Q=np.zeros((n,n))

‎control/statesp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ def minreal(self, tol=0.0):
11931193
returnStateSpace(A[:nr, :nr],B[:nr, :self.ninputs],
11941194
C[:self.noutputs, :nr],self.D,self.dt)
11951195
exceptImportError:
1196-
raiseTypeError("minreal requiresSlycot tb01pd")
1196+
raiseTypeError("minreal requiresslycot tb01pd")
11971197
else:
11981198
returnStateSpace(self)
11991199

@@ -2015,7 +2015,7 @@ def linfnorm(sys, tol=1e-10):
20152015
20162016
"""
20172017
ifab13ddisNone:
2018-
raiseControlSlycot("Can't find slycot module'ab13dd'")
2018+
raiseControlSlycot("Can't find slycot module ab13dd")
20192019

20202020
a,b,c,d=ssdata(_convert_to_statespace(sys))
20212021
e=np.eye(a.shape[0])

‎control/stochsys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ def create_estimator_iosystem(
469469
# Set the output matrices
470470
ifCisnotNone:
471471
# Make sure we have full system output (allowing for numerical errors)
472-
ifnotnp.allclose(sys.C,np.eye(sys.nstates)):
472+
ifsys.C.shape[0]!=sys.nstatesor \
473+
notnp.allclose(sys.C,np.eye(sys.nstates)):
473474
raiseValueError("System output must be full state")
474475

475476
# Make sure that the output matches the size of RN

‎control/sysnorm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ def _h2norm_slycot(sys, print_warning=True):
2929
try:
3030
fromslycotimportab13bd
3131
exceptImportError:
32-
ct.ControlSlycot("Can't find slycot module`ab13bd`!")
32+
ct.ControlSlycot("Can't find slycot module ab13bd")
3333

3434
try:
3535
fromslycot.exceptionsimportSlycotArithmeticError
3636
exceptImportError:
3737
raisect.ControlSlycot(
38-
"Can't find slycot class`SlycotArithmeticError`!")
38+
"Can't find slycot class SlycotArithmeticError")
3939

4040
A,B,C,D=ct.ssdata(ct.ss(sys))
4141

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp