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

Commit0836ad8

Browse files
committed
Removed redundant if condition
1 parent2f982bb commit0836ad8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎control/statefbk.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ def gram(sys, type):
11191119
iftypenotin ['c','o','cf','of']:
11201120
raiseValueError("That type is not supported!")
11211121

1122-
# Checkfor continuous or discrete
1122+
# Checkif system is continuous or discrete
11231123
ifsys.isctime():
11241124
dico='C'
11251125

@@ -1128,15 +1128,13 @@ def gram(sys, type):
11281128
ifnp.any(np.linalg.eigvals(sys.A).real>=0.0):
11291129
raiseValueError("Oops, the system is unstable!")
11301130

1131-
elifsys.isdtime():
1131+
else:
1132+
assertsys.isdtime()
11321133
dico='D'
11331134

11341135
ifnp.any(np.abs(sys.poles())>=1.):
11351136
raiseValueError("Oops, the system is unstable!")
11361137

1137-
else:
1138-
raiseValueError("sys")
1139-
11401138
iftype=='c'ortype=='o':
11411139
# Compute Gramian by the Slycot routine sb03md
11421140
# make sure Slycot is installed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp