8000 disabled MIMO test when no slycot · python-control/python-control@92a3354 · GitHub
[go: up one dir, main page]

Skip to content

Commit 92a3354

Browse files
committed
disabled MIMO test when no slycot
1 parent 50c9bf5 commit 92a3354

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

control/statesp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ def _convertToStateSpace(sys, **kw):
775775

776776
# Change the numerator and denominator arrays so that the transfer
777777
# function matrix has a common denominator.
778+
# matrices are also sized/padded to fit td04ad
778779
num, den, denorder = sys._common_den()
779780

780781
# transfer function to state space conversion now should work!

control/tests/convert_test.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,18 @@ def testSs2tfStaticMimo(self):
232232
def testTf2SsDuplicatePoles(self):
233233
"""Tests for "too few poles for MIMO tf #111" """
234234
import control
235-
num = [ [ [1], [0] ],
236-
[ [0], [1] ] ]
235+
try:
236+
import slycot
237+
num = [ [ [1], [0] ],
238+
[ [0], [1] ] ]
237239

238-
den = [ [ [1,0], [1] ],
240+
den = [ [ [1,0], [1] ],
239241
[ [1], [1,0] ] ]
240-
g = control.tf(num, den)
241-
s = control.ss(g)
242-
np.testing.assert_array_equal(g.pole(), s.pole())
242+
g = control.tf(num, den)
243+
s = control.ss(g)
244+
np.testing.assert_array_equal(g.pole(), s.pole())
245+
except ImportError:
246+
print("Slycot not present, skipping")
243247

244248
def suite():
245249
return unittest.TestLoader().loadTestsFromTestCase(TestConvert)

0 commit comments

Comments
 (0)
0