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):
11191119 if type not in ['c' , 'o' , 'cf' , 'of' ]:
11201120 raise ValueError ("That type is not supported!" )
11211121
1122- # Check for continuous or discrete
1122+ # Check if system is continuous or discrete
11231123 if sys .isctime ():
11241124 dico = 'C'
11251125
@@ -1128,15 +1128,13 @@ def gram(sys, type):
11281128 if np .any (np .linalg .eigvals (sys .A ).real >= 0.0 ):
11291129 raise ValueError ("Oops, the system is unstable!" )
11301130
1131- elif sys .isdtime ():
1131+ else :
1132+ assert sys .isdtime ()
11321133 dico = 'D'
11331134
11341135 if np .any (np .abs (sys .poles ()) >= 1. ):
11351136 raise ValueError ("Oops, the system is unstable!" )
11361137
1137- else :
1138- raise ValueError ("sys" )
1139-
11401138 if type == 'c' or type == 'o' :
11411139 # Compute Gramian by the Slycot routine sb03md
11421140 # make sure Slycot is installed
You can’t perform that action at this time.
0 commit comments