Skip to content

Commit a7f5f1c

Browse files
bnavigatormurrayrm
authored andcommitted
Copy PR #320 fix for robust_array_test to fix OpenSUSE bug (#365)
PR #314 duplicates a lot of code in the test cases by introducing *_array_test.py files. Thus issue #190 addressed in PR #320 resurfaces and needs to be introduced to robust_array_test.pyas well.
1 parent 319a756 commit a7f5f1c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

control/tests/robust_array_test.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def testMimoW3(self):
261261
@unittest.skipIf(not slycot_check(), "slycot not installed")
262262
def testMimoW123(self):
263263
"""MIMO plant with all weights"""
264-
from control import augw, ss, append
264+
from control import augw, ss, append, minreal
265265
g = ss([[-1., -2], [-3, -4]],
266266
[[1., 0.], [0., 1.]],
267267
[[1., 0.], [0., 1.]],
@@ -311,10 +311,10 @@ def testMimoW123(self):
311311
self.siso_almost_equal(w2[1, 1], p[3, 3])
312312
# u->z3 should be w3*g
313313
w3g = w3 * g;
314-
self.siso_almost_equal(w3g[0, 0], p[4, 2])
315-
self.siso_almost_equal(w3g[0, 1], p[4, 3])
316-
self.siso_almost_equal(w3g[1, 0], p[5, 2])
317-
self.siso_almost_equal(w3g[1, 1], p[5, 3])
314+
self.siso_almost_equal(w3g[0, 0], minreal(p[4, 2]))
315+
self.siso_almost_equal(w3g[0, 1], minreal(p[4, 3]))
316+
self.siso_almost_equal(w3g[1, 0], minreal(p[5, 2]))
317+
self.siso_almost_equal(w3g[1, 1], minreal(p[5, 3]))
318318
# u->v should be -g
319319
self.siso_almost_equal(-g[0, 0], p[6, 2])
320320
self.siso_almost_equal(-g[0, 1], p[6, 3])

0 commit comments

Comments
 (0)