Skip to content

Commit d9e44d2

Browse files
committed
address @slivingston review comments
1 parent 6fcf741 commit d9e44d2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

control/tests/margin_test.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
from numpy import inf, nan
1313
from 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

2119
s = 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")
124122
def test_phase_crossover_frequencies(tfargs, omega_ref, gain_ref):
125123
"""Test phase_crossover_frequencies() function"""
126124
sys = TransferFunction(*tfargs)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy