File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -775,6 +775,7 @@ def _convertToStateSpace(sys, **kw):
775
775
776
776
# Change the numerator and denominator arrays so that the transfer
777
777
# function matrix has a common denominator.
778
+ # matrices are also sized/padded to fit td04ad
778
779
num , den , denorder = sys ._common_den ()
779
780
780
781
# transfer function to state space conversion now should work!
Original file line number Diff line number Diff line change @@ -232,14 +232,18 @@ def testSs2tfStaticMimo(self):
232
232
def testTf2SsDuplicatePoles (self ):
233
233
"""Tests for "too few poles for MIMO tf #111" """
234
234
import control
235
- num = [ [ [1 ], [0 ] ],
236
- [ [0 ], [1 ] ] ]
235
+ try :
236
+ import slycot
237
+ num = [ [ [1 ], [0 ] ],
238
+ [ [0 ], [1 ] ] ]
237
239
238
- den = [ [ [1 ,0 ], [1 ] ],
240
+ den = [ [ [1 ,0 ], [1 ] ],
239
241
[ [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" )
243
247
244
248
def suite ():
245
249
return unittest .TestLoader ().loadTestsFromTestCase (TestConvert )
You can’t perform that action at this time.
0 commit comments