Skip to content

Commit 7b04c01

Browse files
committed
add unit test for state space system with no transmission zero
1 parent f79fbe4 commit 7b04c01

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

control/tests/statesp_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ def testPole(self):
4242

4343
np.testing.assert_array_almost_equal(p, true_p)
4444

45+
def testEmptyZero(self):
46+
"""Test to make sure zero() works with no zeros in system"""
47+
sys = _convertToStateSpace(TransferFunction([1], [1,2,1]))
48+
np.testing.assert_array_equal(sys.zero(), np.array([]))
49+
4550
@unittest.skipIf(not slycot_check(), "slycot not installed")
4651
def testMIMOZero_nonsquare(self):
4752
"""Evaluate the zeros of a MIMO system."""

0 commit comments

Comments
 (0)