Skip to content

Commit 6f79ea2

Browse files
committed
add symmetric_kwargs to missed code paths
1 parent c618ca4 commit 6f79ea2

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎control/mateqn.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def lyap(A, Q, C=None, E=None, method=None, symmetric_kwargs=None):
200200
# Solve the generalized Lyapunov equation
201201
elif C is None and E is not None:
202202
# Check to make sure input matrices are the right shape and type
203-
_check_shape(Q, n, n, square=True, symmetric=True, name="Q")
203+
_check_shape(Q, n, n, square=True, symmetric=True, name="Q", symmetric_kwargs=symmetric_kwargs)
204204
_check_shape(E, n, n, square=True, name="E")
205205

206206
if method == 'scipy':
@@ -412,7 +412,7 @@ def dlyap(A, Q, C=None, E=None, method=None, symmetric_kwargs=None):
412412
# Solve the generalized Lyapunov equation
413413
elif C is None and E is not None:
414414
# Check to make sure input matrices are the right shape and type
415-
_check_shape(Q, n, n, square=True, symmetric=True, name="Q")
415+
_check_shape(Q, n, n, square=True, symmetric=True, name="Q", symmetric_kwargs=symmetric_kwargs)
416416
_check_shape(E, n, n, square=True, name="E")
417417

418418
if method == 'scipy':
@@ -803,4 +803,4 @@ def _is_symmetric(M, symmetric_kwargs=None):
803803

804804
if np.iscomplexobj(M):
805805
return sp.linalg.ishermitian(M, **symmetric_kwargs)
806-
return sp.linalg.issymmetric(M, **symmetric_kwargs)
806+
return sp.linalg.issymmetric(M, **symmetric_kwargs)

‎control/stochsys.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def create_estimator_iosystem(
318318
control_indices=None, disturbance_indices=None,
319319
estimate_labels='xhat[{i}]', covariance_labels='P[{i},{j}]',
320320
measurement_labels=None, control_labels=None,
321-
inputs=None, outputs=None, states=None, **kwargs):
321+
inputs=None, outputs=None, states=None, symmetric_kwargs=None, **kwargs):
322322
r"""Create an I/O system implementing a linear quadratic estimator.
323323
324324
This function creates an input/output system that implements a
@@ -416,6 +416,9 @@ def create_estimator_iosystem(
416416
name : string, optional
417417
System name (used for specifying signals). If unspecified, a generic
418418
name 'sys[id]' is generated with a unique integer id.
419+
symmetric_kwargs : dict, optional
420+
Keyword arguments passed to `scipy.linalg.issymmetric` or
421+
`scipy.linalg.ishermitian`.
419422
420423
Notes
421424
-----
@@ -498,7 +501,7 @@ def create_estimator_iosystem(
498501
if P0 is None:
499502
# Initialize P0 to the steady state value
500503
_, P0, _ = lqe(A, G, C, QN, RN)
501-
P0 = _check_shape(P0, sys.nstates, sys.nstates, symmetric=True, name='P0')
504+
P0 = _check_shape(P0, sys.nstates, sys.nstates, symmetric=True, name='P0', symmetric_kwargs=symmetric_kwargs)
502505

503506
# Figure out the labels to use
504507
estimate_labels = _process_labels(

0 commit comments

Comments
 (0)