@@ -163,7 +163,7 @@ def lyap(A, Q, C=None, E=None):
163163 raise ControlDimension ("Q must be a square matrix." )
164164
165165 if not _is_symmetric (Q ):
166- raise ControlDimension ("Q must be a symmetric matrix." )
166+ raise ValueError ("Q must be a symmetric matrix." )
167167
168168 # Solve the Lyapunov equation by calling Slycot function sb03md
169169 try :
@@ -345,7 +345,7 @@ def dlyap(A, Q, C=None, E=None):
345345 raise ControlDimension ("Q must be a square matrix." )
346346
347347 if not _is_symmetric (Q ):
348- raise ControlDimension ("Q must be a symmetric matrix." )
348+ raise ValueError ("Q must be a symmetric matrix." )
349349
350350 # Solve the Lyapunov equation by calling the Slycot function sb03md
351351 try :
@@ -408,7 +408,7 @@ def dlyap(A, Q, C=None, E=None):
408408 dimension as A." )
409409
410410 if not _is_symmetric (Q ):
411- raise ControlDimension ("Q must be a symmetric matrix." )
411+ raise ValueError ("Q must be a symmetric matrix." )
412412
413413 # Solve the generalized Lyapunov equation by calling Slycot
414414 # function sg03ad
@@ -585,10 +585,10 @@ def care_slycot(A, B, Q, R=None, S=None, E=None, stabilizing=True):
585585 raise ControlDimension ("Incompatible dimensions of B matrix." )
586586
587587 if not _is_symmetric (Q ):
588- raise ControlDimension ("Q must be a symmetric matrix." )
588+ raise ValueError ("Q must be a symmetric matrix." )
589589
590590 if not _is_symmetric (R ):
591- raise ControlDimension ("R must be a symmetric matrix." )
591+ raise ValueError ("R must be a symmetric matrix." )
592592
593593 # Create back-up of arrays needed for later computations
594594 R_ba = copy (R )
@@ -688,10 +688,10 @@ def care_slycot(A, B, Q, R=None, S=None, E=None, stabilizing=True):
688688 raise ControlDimension ("Incompatible dimensions of S matrix." )
689689
690690 if not _is_symmetric (Q ):
691- raise ControlDimension ("Q must be a symmetric matrix." )
691+ raise ValueError ("Q must be a symmetric matrix." )
692692
693693 if not _is_symmetric (R ):
694- raise ControlDimension ("R must be a symmetric matrix." )
694+ raise ValueError ("R must be a symmetric matrix." )
695695
696696 # Create back-up of arrays needed for later computations
697697 R_b = copy (R )
@@ -897,10 +897,10 @@ def dare_slycot(A, B, Q, R, S=None, E=None, stabilizing=True):
897897 raise ControlDimension ("Incompatible dimensions of B matrix." )
898898
899899 if not _is_symmetric (Q ):
900- raise ControlDimension ("Q must be a symmetric matrix." )
900+ raise ValueError ("Q must be a symmetric matrix." )
901901
902902 if not _is_symmetric (R ):
903- raise ControlDimension ("R must be a symmetric matrix." )
903+ raise ValueError ("R must be a symmetric matrix." )
904904
905905 # Create back-up of arrays needed for later computations
906906 A_ba = copy (A )
@@ -1004,10 +1004,10 @@ def dare_slycot(A, B, Q, R, S=None, E=None, stabilizing=True):
10041004 raise ControlDimension ("Incompatible dimensions of S matrix." )
10051005
10061006 if not _is_symmetric (Q ):
1007- raise ControlDimension ("Q must be a symmetric matrix." )
1007+ raise ValueError ("Q must be a symmetric matrix." )
10081008
10091009 if not _is_symmetric (R ):
1010- raise ControlDimension ("R must be a symmetric matrix." )
1010+ raise ValueError ("R must be a symmetric matrix." )
10111011
10121012 # Create back-up of arrays needed for later computations
10131013 A_b = copy (A )
0 commit comments