Skip to content

Commit 6aee194

Browse files
committed
Added sorting of poles to the state-space unit test
1 parent 2959df8 commit 6aee194

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

control/tests/statesp_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ def setUp(self):
3232
def testPole(self):
3333
"""Evaluate the poles of a MIMO system."""
3434

35-
p = self.sys1.pole()
36-
37-
np.testing.assert_array_almost_equal(p, [3.34747678408874,
35+
p = np.sort(self.sys1.pole())
36+
true_p = np.sort([3.34747678408874,
3837
-3.17373839204437 + 1.47492908003839j,
3938
-3.17373839204437 - 1.47492908003839j])
4039

40+
np.testing.assert_array_almost_equal(p, true_p)
41+
4142
def testZero(self):
4243
"""Evaluate the zeros of a SISO system."""
4344

0 commit comments

Comments
 (0)