@@ -102,15 +102,15 @@ def test_margin_sys(tsys):
102102 sys , refout , refoutall = tsys
103103 """Test margin() function with system input"""
104104 out = margin (sys )
105- assert_allclose (out , np .array (refout )[[0 , 1 , 3 , 4 ]], atol = 1.5e-3 )
105+ assert_allclose (out , np .array (refout )[[0 , 1 , 4 , 3 ]], atol = 1.5e-3 )
106106
107107def test_margin_3input (tsys ):
108108 sys , refout , refoutall = tsys
109109 """Test margin() function with mag, phase, omega input"""
110110 omega = np .logspace (- 2 , 2 , 2000 )
111111 mag , phase , omega_ = sys .frequency_response (omega )
112112 out = margin ((mag , phase * 180 / np .pi , omega_ ))
113- assert_allclose (out , np .array (refout )[[0 , 1 , 3 , 4 ]], atol = 1.5e-3 )
113+ assert_allclose (out , np .array (refout )[[0 , 1 , 4 , 3 ]], atol = 1.5e-3 )
114114
115115
116116@pytest .mark .parametrize (
@@ -276,23 +276,23 @@ def tsys_zmore(request, tsys_zmoresystems):
276276@pytest .mark .parametrize (
277277 'tsys_zmore' ,
278278 [dict (sysname = 'typem1' , K = 2.0 , atol = 1.5e-3 ,
279- result = (float ('Inf' ), - 120.0007 , float ('NaN' ), 0.5774 )),
279+ result = (float ('Inf' ), - 120.0007 , 0.5774 , float ('NaN' ))),
280280 dict (sysname = 'type0' , K = 0.8 , atol = 1.5e-3 ,
281- result = (10.0014 , float ('inf' ), 1.7322 , float ('nan' ))),
281+ result = (10.0014 , float ('inf' ), float ('nan' ), 1.7322 )),
282282 dict (sysname = 'type0' , K = 2.0 , atol = 1e-2 ,
283- result = (4.000 , 67.6058 , 1.7322 , 0.7663 )),
283+ result = (4.000 , 67.6058 , 0.7663 , 1.7322 )),
284284 dict (sysname = 'type1' , K = 1.0 , atol = 1e-4 ,
285- result = (float ('Inf' ), 144.9032 , float ('NaN' ), 0.3162 )),
285+ result = (float ('Inf' ), 144.9032 , 0.3162 , float ('NaN' ))),
286286 dict (sysname = 'type2' , K = 1.0 , atol = 1e-4 ,
287- result = (float ('Inf' ), 44.4594 , float ('NaN' ), 0.7907 )),
287+ result = (float ('Inf' ), 44.4594 , 0.7907 , float ('NaN' ))),
288288 dict (sysname = 'type3' , K = 1.0 , atol = 1.5e-3 ,
289- result = (0.0626 , 37.1748 , 0.1119 , 0.7951 )),
289+ result = (0.0626 , 37.1748 , 0.7951 , 0.1119 )),
290290 dict (sysname = 'example21' , K = 1.0 , atol = 1e-2 ,
291291 result = (0.0100 , - 14.5640 , 0 , 0.0022 )),
292292 dict (sysname = 'example21' , K = 1000.0 , atol = 1e-2 ,
293- result = (0.1793 , 22.5215 , 0.0243 , 0.0630 )),
293+ result = (0.1793 , 22.5215 , 0.0630 , 0.0243 )),
294294 dict (sysname = 'example21' , K = 5000.0 , atol = 1.5e-3 ,
295- result = (4.5596 , 21.2101 , 0.4385 , 0.1868 )),
295+ result = (4.5596 , 21.2101 , 0.1868 , 0.4385 )),
296296 ],
297297 indirect = True )
298298def test_zmore_margin (tsys_zmore ):
0 commit comments