Skip to content

Commit 9a54254

Browse files
committed
Apply review suggestions by @murrayrm: revert comment change, remove parameter
1 parent 8c9e807 commit 9a54254

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

control/tests/freqresp_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def test_dcgain_consistency():
423423
sys_ss = ctrl.tf2ss(sys_tf)
424424
assert 0 in sys_ss.pole()
425425

426-
# Finite (real) numerator over 0 denominator => inf
426+
# Finite (real) numerator over 0 denominator => inf + nanj
427427
np.testing.assert_equal(
428428
sys_tf(0, warn_infinite=False), complex(np.inf, np.nan))
429429
np.testing.assert_equal(
@@ -433,9 +433,9 @@ def test_dcgain_consistency():
433433
np.testing.assert_equal(
434434
sys_ss(0j, warn_infinite=False), complex(np.inf, np.nan))
435435
np.testing.assert_equal(
436-
sys_tf.dcgain(warn_infinite=False), np.inf)
436+
sys_tf.dcgain(), np.inf)
437437
np.testing.assert_equal(
438-
sys_ss.dcgain(warn_infinite=False), np.inf)
438+
sys_ss.dcgain(), np.inf)
439439

440440
# Set up transfer function with pole, zero at the origin
441441
sys_tf = ctrl.tf([1, 0], [1, 0])
@@ -448,7 +448,7 @@ def test_dcgain_consistency():
448448
np.testing.assert_equal(
449449
sys_tf(0j, warn_infinite=False), complex(np.nan, np.nan))
450450
np.testing.assert_equal(
451-
sys_tf.dcgain(warn_infinite=False), np.nan)
451+
sys_tf.dcgain(), np.nan)
452452

453453
# Set up state space version
454454
sys_ss = ctrl.tf2ss(ctrl.tf([1, 0], [1, 1])) * \
@@ -462,15 +462,15 @@ def test_dcgain_consistency():
462462
np.testing.assert_equal(
463463
sys_ss(0j, warn_infinite=False), complex(np.nan, np.nan))
464464
np.testing.assert_equal(
465-
sys_ss.dcgain(warn_infinite=False), np.nan)
465+
sys_ss.dcgain(), np.nan)
466466
elif 0 in sys_ss.pole():
467467
# Pole at the origin, but zero elsewhere => should get (inf + nanj)
468468
np.testing.assert_equal(
469469
sys_ss(0, warn_infinite=False), complex(np.inf, np.nan))
470470
np.testing.assert_equal(
471471
sys_ss(0j, warn_infinite=False), complex(np.inf, np.nan))
472472
np.testing.assert_equal(
473-
sys_ss.dcgain(warn_infinite=False), np.inf)
473+
sys_ss.dcgain(), np.inf)
474474
else:
475475
# Near pole/zero cancellation => nothing sensible to check
476476
pass

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