Skip to content

Commit cf0eac3

Browse files
committed
Run autopep8.
1 parent bb16be0 commit cf0eac3

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

control/passivity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def make_LMI_matrix(P):
7878
# crunch feasibility solution
7979
cvx.solvers.options['show_progress'] = False
8080
sol = cvx.solvers.sdp(c,
81-
Gs=[cvx.matrix(coefficents)],
82-
hs=[cvx.matrix(constants)])
81+
Gs=[cvx.matrix(coefficents)],
82+
hs=[cvx.matrix(constants)])
8383

8484
return (sol["x"] is not None)

control/tests/passivity_test.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,23 @@ def test_ispassive():
2525

2626
assert(not passivity.ispassive(sys))
2727

28+
2829
A_d = numpy.array([[-2, 0], [0, 0]])
2930
A = numpy.array([[-3, 0], [0, -2]])
3031
B = numpy.array([[0], [1]])
3132
C = numpy.array([[-1, 2]])
3233
D = numpy.array([[1.5]])
34+
35+
3336
@cvxoptonly
3437
@pytest.mark.parametrize(
35-
"test_input,expected",
36-
[((A,B,C,D*0.0), True),
37-
((A_d,B,C,D), True),
38-
((A*1e12,B,C,D*0), True),
39-
((A,B*0,C*0,D), True),
40-
((A*0,B,C,D), True),
41-
((A*0,B*0,C*0,D*0), True)])
38+
"test_input,expected",
39+
[((A, B, C, D*0.0), True),
40+
((A_d, B, C, D), True),
41+
((A*1e12, B, C, D*0), True),
42+
((A, B*0, C*0, D), True),
43+
((A*0, B, C, D), True),
44+
((A*0, B*0, C*0, D*0), True)])
4245
def test_ispassive_edge_cases(test_input, expected):
4346

4447
# strictly proper
@@ -47,4 +50,4 @@ def test_ispassive_edge_cases(test_input, expected):
4750
C = test_input[2]
4851
D = test_input[3]
4952
sys = ss(A, B, C, D)
50-
assert(passivity.ispassive(sys)==expected)
53+
assert(passivity.ispassive(sys) == expected)

0 commit comments

Comments
 (0)