File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1119,7 +1119,7 @@ def gram(sys, type):
1119
1119
if type not in ['c' , 'o' , 'cf' , 'of' ]:
1120
1120
raise ValueError ("That type is not supported!" )
1121
1121
1122
- # Check for continuous or discrete
1122
+ # Check if system is continuous or discrete
1123
1123
if sys .isctime ():
1124
1124
dico = 'C'
1125
1125
@@ -1128,15 +1128,13 @@ def gram(sys, type):
1128
1128
if np .any (np .linalg .eigvals (sys .A ).real >= 0.0 ):
1129
1129
raise ValueError ("Oops, the system is unstable!" )
1130
1130
1131
- elif sys .isdtime ():
1131
+ else :
1132
+ assert sys .isdtime ()
1132
1133
dico = 'D'
1133
1134
1134
1135
if np .any (np .abs (sys .poles ()) >= 1. ):
1135
1136
raise ValueError ("Oops, the system is unstable!" )
1136
1137
1137
- else :
1138
- raise ValueError ("sys" )
1139
-
1140
1138
if type == 'c' or type == 'o' :
1141
1139
# Compute Gramian by the Slycot routine sb03md
1142
1140
# make sure Slycot is installed
You can’t perform that action at this time.
0 commit comments