4
4
import pytest
5
5
import scipy .linalg
6
6
7
+ from control .tests .conftest import slycotonly
8
+
7
9
from control import ss , tf , tf2ss
8
10
from control .canonical import canonical_form , reachable_form , \
9
11
observable_form , modal_form , similarity_transform , bdschur
@@ -242,6 +244,7 @@ def block_diag_from_eig(eigvals):
242
244
return scipy .linalg .block_diag (* blocks )
243
245
244
246
247
+ @slycotonly
245
248
@pytest .mark .parametrize (
246
249
"eigvals, condmax, blksizes" ,
247
250
[
@@ -266,6 +269,7 @@ def test_bdschur_ref(eigvals, condmax, blksizes):
266
269
np .testing .assert_array_almost_equal (solve (t , a ).dot (t ), b )
267
270
268
271
272
+ @slycotonly
269
273
@pytest .mark .parametrize (
270
274
"eigvals, sorted_blk_eigvals, sort" ,
271
275
[
@@ -294,6 +298,7 @@ def test_bdschur_sort(eigvals, sorted_blk_eigvals, sort):
294
298
blk_eigval .imag )
295
299
296
300
301
+ @slycotonly
297
302
def test_bdschur_defective ():
298
303
# the eigenvalues of this simple defective matrix cannot be separated
299
304
# a previous version of the bdschur would fail on this
@@ -316,16 +321,14 @@ def test_bdschur_condmax_lt_1():
316
321
bdschur (1 , condmax = np .nextafter (1 , 0 ))
317
322
318
323
324
+ @slycotonly
319
325
def test_bdschur_invalid_sort ():
320
326
# sort must be in ('continuous', 'discrete')
321
327
with pytest .raises (ValueError ):
322
328
bdschur (1 , sort = 'no-such-sort' )
323
329
324
330
325
- # temp
326
- from control import ss , tf , ControlNotImplemented
327
-
328
-
331
+ @slycotonly
329
332
@pytest .mark .parametrize (
330
333
"A_true, B_true, C_true, D_true" ,
331
334
[(np .diag ([4.0 , 3.0 , 2.0 , 1.0 ]), # order from largest to smallest
@@ -386,6 +389,7 @@ def test_modal_form(A_true, B_true, C_true, D_true):
386
389
np .dot (np .dot (C , np .linalg .matrix_power (A , i )), B ))
387
390
388
391
392
+ @slycotonly
389
393
@pytest .mark .parametrize (
390
394
"condmax, len_blksizes" ,
391
395
[(1.1 , 1 ),
@@ -404,6 +408,7 @@ def test_modal_form_condmax(condmax, len_blksizes):
404
408
np .testing .assert_array_almost_equal (zsys .D , xsys .D )
405
409
406
410
411
+ @slycotonly
407
412
@pytest .mark .parametrize (
408
413
"sys_type" ,
409
414
['continuous' ,
0 commit comments