Skip to content

Commit 57e3751

Browse files
committed
add test for extraneous keywords in statesp
1 parent 97a0a14 commit 57e3751

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

control/statesp.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,12 @@ def _ss(*args, keywords=None, **kwargs):
17761776
"""Internal function to create StateSpace system"""
17771777
if len(args) == 4 or len(args) == 5:
17781778
return StateSpace(*args, keywords=keywords, **kwargs)
1779+
17791780
elif len(args) == 1:
1781+
# Make sure there were no extraneous keywords
1782+
if kwargs:
1783+
raise TypeError("unrecognized keywords: ", str(kwargs))
1784+
17801785
from .xferfcn import TransferFunction
17811786
sys = args[0]
17821787
if isinstance(sys, StateSpace):

0 commit comments

Comments
 (0)