@@ -95,24 +95,24 @@ def testStep(self):
9595 t = np .linspace (0 , 1 , 10 )
9696 youttrue = np .array ([9. , 17.6457 , 24.7072 , 30.4855 , 35.2234 , 39.1165 ,
9797 42.3227 , 44.9694 , 47.1599 , 48.9776 ])
98- tout , yout = step (sys , T = t )
98+ yout , tout = step (sys , T = t )
9999 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
100100 np .testing .assert_array_almost_equal (tout , t )
101101
102102 # Play with arguments
103- tout , yout = step (sys , T = t , X0 = 0 )
103+ yout , tout = step (sys , T = t , X0 = 0 )
104104 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
105105 np .testing .assert_array_almost_equal (tout , t )
106106
107107 X0 = np .array ([0 , 0 ]);
108- tout , yout = step (sys , T = t , X0 = X0 )
108+ yout , tout = step (sys , T = t , X0 = X0 )
109109 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
110110 np .testing .assert_array_almost_equal (tout , t )
111111
112112 #Test MIMO system, which contains ``siso_ss1`` twice
113113 sys = self .mimo_ss1
114- _t , y_00 = step (sys , T = t , input = 0 , output = 0 )
115- _t , y_11 = step (sys , T = t , input = 1 , output = 1 )
114+ y_00 , _t = step (sys , T = t , input = 0 , output = 0 )
115+ y_11 , _t = step (sys , T = t , input = 1 , output = 1 )
116116 np .testing .assert_array_almost_equal (y_00 , youttrue , decimal = 4 )
117117 np .testing .assert_array_almost_equal (y_11 , youttrue , decimal = 4 )
118118
@@ -122,14 +122,14 @@ def testImpulse(self):
122122 t = np .linspace (0 , 1 , 10 )
123123 youttrue = np .array ([86. , 70.1808 , 57.3753 , 46.9975 , 38.5766 , 31.7344 ,
124124 26.1668 , 21.6292 , 17.9245 , 14.8945 ])
125- tout , yout = impulse (sys , T = t )
125+ yout , tout = impulse (sys , T = t )
126126 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
127127 np .testing .assert_array_almost_equal (tout , t )
128128
129129 #Test MIMO system, which contains ``siso_ss1`` twice
130130 sys = self .mimo_ss1
131- _t , y_00 = impulse (sys , T = t , input = 0 , output = 0 )
132- _t , y_11 = impulse (sys , T = t , input = 1 , output = 1 )
131+ y_00 , _t = impulse (sys , T = t , input = 0 , output = 0 )
132+ y_11 , _t = impulse (sys , T = t , input = 1 , output = 1 )
133133 np .testing .assert_array_almost_equal (y_00 , youttrue , decimal = 4 )
134134 np .testing .assert_array_almost_equal (y_11 , youttrue , decimal = 4 )
135135
@@ -140,15 +140,15 @@ def testInitial(self):
140140 x0 = np .matrix (".5; 1." )
141141 youttrue = np .array ([11. , 8.1494 , 5.9361 , 4.2258 , 2.9118 , 1.9092 ,
142142 1.1508 , 0.5833 , 0.1645 , - 0.1391 ])
143- tout , yout = initial (sys , T = t , X0 = x0 )
143+ yout , tout = initial (sys , T = t , X0 = x0 )
144144 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
145145 np .testing .assert_array_almost_equal (tout , t )
146146
147147 #Test MIMO system, which contains ``siso_ss1`` twice
148148 sys = self .mimo_ss1
149149 x0 = np .matrix (".5; 1.; .5; 1." )
150- _t , y_00 = initial (sys , T = t , X0 = x0 , input = 0 , output = 0 )
151- _t , y_11 = initial (sys , T = t , X0 = x0 , input = 1 , output = 1 )
150+ y_00 , _t = initial (sys , T = t , X0 = x0 , input = 0 , output = 0 )
151+ y_11 , _t = initial (sys , T = t , X0 = x0 , input = 1 , output = 1 )
152152 np .testing .assert_array_almost_equal (y_00 , youttrue , decimal = 4 )
153153 np .testing .assert_array_almost_equal (y_11 , youttrue , decimal = 4 )
154154
@@ -160,18 +160,18 @@ def testLsim(self):
160160 u = np .array ([1. , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ])
161161 youttrue = np .array ([9. , 17.6457 , 24.7072 , 30.4855 , 35.2234 , 39.1165 ,
162162 42.3227 , 44.9694 , 47.1599 , 48.9776 ])
163- tout , yout , _xout = lsim (self .siso_ss1 , u , t )
163+ yout , tout , _xout = lsim (self .siso_ss1 , u , t )
164164 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
165165 np .testing .assert_array_almost_equal (tout , t )
166- _t , yout , _xout = lsim (self .siso_tf3 , u , t )
166+ yout , _t , _xout = lsim (self .siso_tf3 , u , t )
167167 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
168168
169169 #test with initial value and special algorithm for ``U=0``
170170 u = 0
171171 x0 = np .matrix (".5; 1." )
172172 youttrue = np .array ([11. , 8.1494 , 5.9361 , 4.2258 , 2.9118 , 1.9092 ,
173173 1.1508 , 0.5833 , 0.1645 , - 0.1391 ])
174- _t , yout , _xout = lsim (self .siso_ss1 , u , t , x0 )
174+ yout , _t , _xout = lsim (self .siso_ss1 , u , t , x0 )
175175 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
176176
177177 #Test MIMO system, which contains ``siso_ss1`` twice
@@ -184,7 +184,7 @@ def testLsim(self):
184184 [1.9092 , 39.1165 ], [1.1508 , 42.3227 ],
185185 [0.5833 , 44.9694 ], [0.1645 , 47.1599 ],
186186 [- 0.1391 , 48.9776 ]])
187- _t , yout , _xout = lsim (self .mimo_ss1 , u , t , x0 )
187+ yout , _t , _xout = lsim (self .mimo_ss1 , u , t , x0 )
188188 np .testing .assert_array_almost_equal (yout , youttrue , decimal = 4 )
189189
190190 def testDcgain (self ):
@@ -206,7 +206,7 @@ def testDcgain(self):
206206
207207 #Compute the gain with a long simulation
208208 t = linspace (0 , 1000 , 1000 )
209- _t , y = step (sys_ss , t )
209+ y , _t = step (sys_ss , t )
210210 gain_sim = y [- 1 ]
211211 print 'gain_sim:' , gain_sim
212212
0 commit comments