diff --git a/control/rlocus.py b/control/rlocus.py index 281fed082..dab21f4ac 100644 --- a/control/rlocus.py +++ b/control/rlocus.py @@ -160,7 +160,8 @@ def root_locus_plot( from .pzmap import pole_zero_plot # Legacy parameters - gains = config._process_legacy_keyword(kwargs, 'kvect', 'gains', gains) + for oldkey in ['kvect', 'k']: + gains = config._process_legacy_keyword(kwargs, oldkey, 'gains', gains) # Set default parameters grid = config._get_param('rlocus', 'grid', grid, _rlocus_defaults) diff --git a/control/tests/rlocus_test.py b/control/tests/rlocus_test.py index 0b3e868e9..15eb67d97 100644 --- a/control/tests/rlocus_test.py +++ b/control/tests/rlocus_test.py @@ -181,10 +181,11 @@ def test_root_locus_plots(sys, grid, xlim, ylim, interactive): # Test deprecated keywords -def test_root_locus_legacy(): +@pytest.mark.parametrize("keyword", ["kvect", "k"]) +def test_root_locus_legacy(keyword): sys = ct.rss(2, 1, 1) - with pytest.warns(DeprecationWarning, match="'kvect' is deprecated"): - ct.root_locus_plot(sys, kvect=[0, 1, 2]) + with pytest.warns(DeprecationWarning, match=f"'{keyword}' is deprecated"): + ct.root_locus_plot(sys, **{keyword: [0, 1, 2]}) # Generate plots used in documentation 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