1212from numpy import inf , nan
1313from numpy .testing import assert_allclose
1414
15- from ..frdata import FrequencyResponseData
16- from ..margins import margin , phase_crossover_frequencies , stability_margins
17- from ..statesp import StateSpace
18- from ..xferfcn import TransferFunction
19- from ..exception import ControlMIMONotImplemented
15+ from control import ControlMIMONotImplemented , FrequencyResponseData , \
16+ StateSpace , TransferFunction , margin , phase_crossover_frequencies , \
17+ stability_margins
2018
2119s = TransferFunction .s
2220
@@ -110,7 +108,6 @@ def test_margin_3input(tsys):
110108 out = margin ((mag , phase * 180 / np .pi , omega_ ))
111109 assert_allclose (out , np .array (refout )[[0 , 1 , 3 , 4 ]], atol = 1.5e-3 )
112110
113-
114111@pytest .mark .parametrize (
115112 'tfargs, omega_ref, gain_ref' ,
116113 [(([1 ], [1 , 2 , 3 , 4 ]), [1.7325 , 0. ], [- 0.5 , 0.25 ]),
@@ -121,6 +118,7 @@ def test_margin_3input(tsys):
121118 (([200.0 ], [1.0 , 21.0 , 20.0 , 0.0 ]),
122119 [4.47213595 , 0 ], [- 0.47619048 , inf ]),
123120 ])
121+ @pytest .mark .filterwarnings ("error" )
124122def test_phase_crossover_frequencies (tfargs , omega_ref , gain_ref ):
125123 """Test phase_crossover_frequencies() function"""
126124 sys = TransferFunction (* tfargs )
0 commit comments