Skip to content

Commit fd72ea8

Browse files
committed
Fix whitespace in symmetry tests
1 parent 29fd88c commit fd72ea8

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎control/mateqn.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,7 @@ def _check_shape(M, n, m, square=False, symmetric=False, name="??"):
786786

787787
# Utility function to check if a matrix is symmetric
788788
def _is_symmetric(M):
789-
790789
M = np.atleast_2d(M)
791-
792790
if isinstance(M[0, 0], inexact):
793791
return (
794792
np.linalg.norm(M - M.conj().T, 1)

‎control/tests/mateqn_test.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,26 +466,24 @@ def test_raise(self):
466466
cdare(A, B, Qfs, R, S, E)
467467
with pytest.raises(ControlArgument):
468468
cdare(A, B, Q, Rfs, S, E)
469+
469470
def test_is_symmetric_scale_aware(self):
470471
M = np.array([
471472
[1e8, 1e8],
472473
[1e8 + 1e-8, 1e8]
473474
])
474-
475475
assert _is_symmetric(M)
476+
476477
def test_is_symmetric_rejects_asymmetric(self):
477478
M = np.array([
478479
[1., 2.],
479480
[5., 1.]
480481
])
481-
482482
assert not _is_symmetric(M)
483483

484-
485484
def test_is_symmetric_complex_hermitian(self):
486485
M = np.array([
487486
[1., 2. + 1.j],
488487
[2. - 1.j, 3.]
489488
])
490-
491489
assert _is_symmetric(M)

0 commit comments

Comments
 (0)