@@ -163,7 +163,7 @@ def lyap(A, Q, C=None, E=None):
163
163
raise ControlDimension ("Q must be a square matrix." )
164
164
165
165
if not _is_symmetric (Q ):
166
- raise ControlDimension ("Q must be a symmetric matrix." )
166
+ raise ValueError ("Q must be a symmetric matrix." )
167
167
168
168
# Solve the Lyapunov equation by calling Slycot function sb03md
169
169
try :
@@ -345,7 +345,7 @@ def dlyap(A, Q, C=None, E=None):
345
345
raise ControlDimension ("Q must be a square matrix." )
346
346
347
347
if not _is_symmetric (Q ):
348
- raise ControlDimension ("Q must be a symmetric matrix." )
348
+ raise ValueError ("Q must be a symmetric matrix." )
349
349
350
350
# Solve the Lyapunov equation by calling the Slycot function sb03md
351
351
try :
@@ -408,7 +408,7 @@ def dlyap(A, Q, C=None, E=None):
408
408
dimension as A." )
409
409
410
410
if not _is_symmetric (Q ):
411
- raise ControlDimension ("Q must be a symmetric matrix." )
411
+ raise ValueError ("Q must be a symmetric matrix." )
412
412
413
413
# Solve the generalized Lyapunov equation by calling Slycot
414
414
# function sg03ad
@@ -585,10 +585,10 @@ def care_slycot(A, B, Q, R=None, S=None, E=None, stabilizing=True):
585
585
raise ControlDimension ("Incompatible dimensions of B matrix." )
586
586
587
587
if not _is_symmetric (Q ):
588
- raise ControlDimension ("Q must be a symmetric matrix." )
588
+ raise ValueError ("Q must be a symmetric matrix." )
589
589
590
590
if not _is_symmetric (R ):
591
- raise ControlDimension ("R must be a symmetric matrix." )
591
+ raise ValueError ("R must be a symmetric matrix." )
592
592
593
593
# Create back-up of arrays needed for later computations
594
594
R_ba = copy (R )
@@ -688,10 +688,10 @@ def care_slycot(A, B, Q, R=None, S=None, E=None, stabilizing=True):
688
688
raise ControlDimension ("Incompatible dimensions of S matrix." )
689
689
690
690
if not _is_symmetric (Q ):
691
- raise ControlDimension ("Q must be a symmetric matrix." )
691
+ raise ValueError ("Q must be a symmetric matrix." )
692
692
693
693
if not _is_symmetric (R ):
694
- raise ControlDimension ("R must be a symmetric matrix." )
694
+ raise ValueError ("R must be a symmetric matrix." )
695
695
696
696
# Create back-up of arrays needed for later computations
697
697
R_b = copy (R )
@@ -897,10 +897,10 @@ def dare_slycot(A, B, Q, R, S=None, E=None, stabilizing=True):
897
897
raise ControlDimension ("Incompatible dimensions of B matrix." )
898
898
899
899
if not _is_symmetric (Q ):
900
- raise ControlDimension ("Q must be a symmetric matrix." )
900
+ raise ValueError ("Q must be a symmetric matrix." )
901
901
902
902
if not _is_symmetric (R ):
903
- raise ControlDimension ("R must be a symmetric matrix." )
903
+ raise ValueError ("R must be a symmetric matrix." )
904
904
905
905
# Create back-up of arrays needed for later computations
906
906
A_ba = copy (A )
@@ -1004,10 +1004,10 @@ def dare_slycot(A, B, Q, R, S=None, E=None, stabilizing=True):
1004
1004
raise ControlDimension ("Incompatible dimensions of S matrix." )
1005
1005
1006
1006
if not _is_symmetric (Q ):
1007
- raise ControlDimension ("Q must be a symmetric matrix." )
1007
+ raise ValueError ("Q must be a symmetric matrix." )
1008
1008
1009
1009
if not _is_symmetric (R ):
1010
- raise ControlDimension ("R must be a symmetric matrix." )
1010
+ raise ValueError ("R must be a symmetric matrix." )
1011
1011
1012
1012
# Create back-up of arrays needed for later computations
1013
1013
A_b = copy (A )
0 commit comments