diff --git a/slycot/tests/CMakeLists.txt b/slycot/tests/CMakeLists.txt index 80d751da..535efc0a 100644 --- a/slycot/tests/CMakeLists.txt +++ b/slycot/tests/CMakeLists.txt @@ -1,16 +1,31 @@ set(PYSOURCE __init__.py - test_ab01.py + test_ab01nd.py test_ab04md.py + test_ab05md.py + test_ab05nd.py + test_ab07nd.py test_ab08n.py + test_ab08nd.py + test_ab08nz.py + test_ab09ad.py + test_ab09ax.py + test_ab09bd.py + test_ab09md.py + test_ab09nd.py + test_ab13bd.py + test_ab13dd.py + test_ab13ed.py + test_ab13fd.py + test_ab13md.py test_ag08bd.py + test_analysis.py test_examples.py test_exceptions.py test_mb.py test_mc.py test_sb.py - test_analysis.py test_transform.py test_sg02ad.py test_sg03ad.py diff --git a/slycot/tests/test_ab01.py b/slycot/tests/test_ab01.py deleted file mode 100644 index 01c1242b..00000000 --- a/slycot/tests/test_ab01.py +++ /dev/null @@ -1,65 +0,0 @@ -""" -Test ab01 wrappers - -@author: bnavigator -""" - -from numpy import array -from numpy.testing import assert_allclose, assert_equal -from scipy.linalg.lapack import dorgqr - -from slycot.analysis import ab01nd - - -def test_ab01nd(): - """SLICOT doc example - - http://slicot.org/objects/software/shared/doc/AB01ND.html""" - - # Example program data - n = 3 - m = 2 - tol = 0.0 - - A = array([[-1., 0., 0.], - [-2., -2., -2.], - [-1., 0., -3.]]) - B = array([[1., 0.], - [0, 2.], - [0., 1.]]) - - for jobz in ['N', 'I', 'F']: - Ac, Bc, ncont, indcon, nblk, Z, tau = ab01nd(n, m, A, B, - jobz=jobz, tol=tol) - - # The transformed state dynamics matrix of a controllable realization - assert_allclose(Ac[:ncont, :ncont], array([[-3.0000, 2.2361], - [ 0.0000, -1.0000]]), - atol=0.0001) - - # and the dimensions of its diagonal blocks are - assert_equal(nblk[:indcon], array([2])) - - # The transformed input/state matrix B of a controllable realization - assert_allclose(Bc[:ncont, :],array([[ 0.0000, -2.2361], - [ 1.0000, 0.0000]]), - atol=0.0001) - - # The controllability index of the transformed system representation - assert indcon == 1 - - if jobz == 'N': - assert Z is None - continue - elif jobz == 'I': - Z_ = Z - elif jobz == 'F': - Z_, _, info = dorgqr(Z, tau) - assert info == 0 - - # The similarity transformation matrix Z - assert_allclose(Z_, array([[ 0.0000, 1.0000, 0.0000], - [-0.8944, 0.0000, -0.4472], - [-0.4472, 0.0000, 0.8944]]), - atol=0.0001) - diff --git a/slycot/tests/test_ab01nd.py b/slycot/tests/test_ab01nd.py new file mode 100644 index 00000000..05922ee4 --- /dev/null +++ b/slycot/tests/test_ab01nd.py @@ -0,0 +1,67 @@ +""" +Test ab01 wrappers + +@author: bnavigator +""" + +from numpy import array +from numpy.testing import assert_allclose, assert_equal +from scipy.linalg.lapack import dorgqr + +from slycot.analysis import ab01nd + + +class Test_ab01nd: + + def test_ab01nd(self): + """SLICOT doc example + + http://slicot.org/objects/software/shared/doc/AB01ND.html""" + + # Example program data + n = 3 + m = 2 + tol = 0.0 + + A = array([[-1., 0., 0.], + [-2., -2., -2.], + [-1., 0., -3.]]) + B = array([[1., 0.], + [0, 2.], + [0., 1.]]) + + for jobz in ['N', 'I', 'F']: + Ac, Bc, ncont, indcon, nblk, Z, tau = ab01nd(n, m, A, B, + jobz=jobz, tol=tol) + + # The transformed state dynamics matrix of a controllable realization + assert_allclose(Ac[:ncont, :ncont], array([[-3.0000, 2.2361], + [ 0.0000, -1.0000]]), + atol=0.0001) + + # and the dimensions of its diagonal blocks are + assert_equal(nblk[:indcon], array([2])) + + # The transformed input/state matrix B of a controllable realization + assert_allclose(Bc[:ncont, :],array([[ 0.0000, -2.2361], + [ 1.0000, 0.0000]]), + atol=0.0001) + + # The controllability index of the transformed system representation + assert indcon == 1 + + if jobz == 'N': + assert Z is None + continue + elif jobz == 'I': + Z_ = Z + elif jobz == 'F': + Z_, _, info = dorgqr(Z, tau) + assert info == 0 + + # The similarity transformation matrix Z + assert_allclose(Z_, array([[ 0.0000, 1.0000, 0.0000], + [-0.8944, 0.0000, -0.4472], + [-0.4472, 0.0000, 0.8944]]), + atol=0.0001) + diff --git a/slycot/tests/test_ab05md.py b/slycot/tests/test_ab05md.py new file mode 100644 index 00000000..41d7a205 --- /dev/null +++ b/slycot/tests/test_ab05md.py @@ -0,0 +1,13 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis + + +class Test_ab05md: + + @pytest.mark.skip("not implemented yet, TODO") + def test_ab05md(): + pass \ No newline at end of file diff --git a/slycot/tests/test_ab05nd.py b/slycot/tests/test_ab05nd.py new file mode 100644 index 00000000..cad27c7f --- /dev/null +++ b/slycot/tests/test_ab05nd.py @@ -0,0 +1,15 @@ +import pytest + +from slycot import analysis +from slycot.exceptions import SlycotArithmeticError + +from .test_exceptions import assert_docstring_parse + + +class Test_ab05nd: + + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab05nd, SlycotArithmeticError, 1, {'p1': 1}),)) + def test_ab_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) \ No newline at end of file diff --git a/slycot/tests/test_ab07nd.py b/slycot/tests/test_ab07nd.py new file mode 100644 index 00000000..a82b9f2b --- /dev/null +++ b/slycot/tests/test_ab07nd.py @@ -0,0 +1,13 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis + + +class Test_ab07nd: + + @pytest.mark.skip("not implemented yet, TODO") + def test_ab07nd(): + pass \ No newline at end of file diff --git a/slycot/tests/test_ab08nd.py b/slycot/tests/test_ab08nd.py new file mode 100644 index 00000000..ed296b18 --- /dev/null +++ b/slycot/tests/test_ab08nd.py @@ -0,0 +1,13 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis + + +class Test_ab08nd: + + @pytest.mark.skip("not implemented yet, TODO") + def test_ab08nd(): + pass \ No newline at end of file diff --git a/slycot/tests/test_ab08nz.py b/slycot/tests/test_ab08nz.py new file mode 100644 index 00000000..047a60d3 --- /dev/null +++ b/slycot/tests/test_ab08nz.py @@ -0,0 +1,13 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis + + +class Test_ab08nz: + + @pytest.mark.skip("not implemented yet, TODO") + def test_ab08nz(): + pass \ No newline at end of file diff --git a/slycot/tests/test_ab09ad.py b/slycot/tests/test_ab09ad.py new file mode 100644 index 00000000..c0818f72 --- /dev/null +++ b/slycot/tests/test_ab09ad.py @@ -0,0 +1,21 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis +from slycot.exceptions import SlycotArithmeticError, SlycotResultWarning + +from .test_exceptions import assert_docstring_parse + + +class Test_ab09ad: + + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab09ad, SlycotArithmeticError, 3, {'dico': 'C'}), + (analysis.ab09ad, SlycotArithmeticError, (2,), {'dico': 'D'}), + (analysis.ab09ad, SlycotResultWarning, ((1, 0), ), {'nr': 3, + 'Nr': 2}),)) + def test_ab09ad_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) \ No newline at end of file diff --git a/slycot/tests/test_ab09ax.py b/slycot/tests/test_ab09ax.py new file mode 100644 index 00000000..d6e07f3e --- /dev/null +++ b/slycot/tests/test_ab09ax.py @@ -0,0 +1,19 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis +from slycot.exceptions import SlycotArithmeticError, SlycotResultWarning + +from .test_exceptions import assert_docstring_parse + + +class Test_ab09ax: + + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab09ax, SlycotArithmeticError, 2, {'dico': 'C'}), + (analysis.ab09ax, SlycotResultWarning, ((1, 0), ), {'nr': 3, 'Nr': 2}),)) + def test_ab09ax_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) \ No newline at end of file diff --git a/slycot/tests/test_ab09bd.py b/slycot/tests/test_ab09bd.py new file mode 100644 index 00000000..84023db6 --- /dev/null +++ b/slycot/tests/test_ab09bd.py @@ -0,0 +1,13 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis + + +class Test_ab09bd: + + @pytest.mark.skip("not implemented yet, TODO") + def test_ab09bd(): + pass \ No newline at end of file diff --git a/slycot/tests/test_ab09md.py b/slycot/tests/test_ab09md.py new file mode 100644 index 00000000..a5d05a53 --- /dev/null +++ b/slycot/tests/test_ab09md.py @@ -0,0 +1,22 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + + +from slycot import analysis +from slycot.exceptions import SlycotArithmeticError, SlycotResultWarning + +from .test_exceptions import assert_docstring_parse + + +class Test_ab09md: + + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab09md, SlycotArithmeticError, 3, {'alpha': -0.1}), + (analysis.ab09md, SlycotResultWarning, ((1, 0), (2, 0)), {'nr': 3, + 'Nr': 2, + 'alpha': -0.1}),)) + def test_ab09md_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) \ No newline at end of file diff --git a/slycot/tests/test_ab09nd.py b/slycot/tests/test_ab09nd.py new file mode 100644 index 00000000..1244dbb4 --- /dev/null +++ b/slycot/tests/test_ab09nd.py @@ -0,0 +1,21 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis +from slycot.exceptions import SlycotArithmeticError, SlycotResultWarning + +from .test_exceptions import assert_docstring_parse + + +class Test_ab09nd: + + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab09nd, SlycotArithmeticError, 3, {'alpha': -0.1}), + (analysis.ab09nd, SlycotResultWarning, ((1, 0), (2, 0)), {'nr': 3, + 'Nr': 2, + 'alpha': -0.1}),)) + def test_ab09nd_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) \ No newline at end of file diff --git a/slycot/tests/test_ab13bd.py b/slycot/tests/test_ab13bd.py index dd2a735a..727677f0 100644 --- a/slycot/tests/test_ab13bd.py +++ b/slycot/tests/test_ab13bd.py @@ -2,10 +2,14 @@ # ab08n* tests import numpy as np +import pytest from numpy.testing import assert_allclose, assert_array_equal, assert_equal from scipy import linalg, signal from slycot import analysis +from slycot.exceptions import SlycotArithmeticError, SlycotResultWarning + +from .test_exceptions import assert_docstring_parse class Test_ab13bd: @@ -19,6 +23,13 @@ class Test_ab13bd: Ad, Bd, Cd, Dd, dt = signal.cont2discrete((A, B, C, D), 0.1, method='zoh') + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab13bd, SlycotArithmeticError, 6, {'dico': 'C'}), + (analysis.ab13bd, SlycotResultWarning, ((1, 0),), {}),)) + def test_ab13bd_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) + def test_no_change_args_ccase(self): """ ab13md must not change its arguments. continuous system case. """ diff --git a/slycot/tests/test_ab13dd.py b/slycot/tests/test_ab13dd.py new file mode 100644 index 00000000..d725aed4 --- /dev/null +++ b/slycot/tests/test_ab13dd.py @@ -0,0 +1,19 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + + +from slycot import analysis +from slycot.exceptions import SlycotArithmeticError, SlycotResultWarning + +from .test_exceptions import assert_docstring_parse + + +class Test_ab13dd: + + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab13dd, SlycotArithmeticError, 4, {}),)) + def test_ab13dd_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) \ No newline at end of file diff --git a/slycot/tests/test_ab13ed.py b/slycot/tests/test_ab13ed.py new file mode 100644 index 00000000..064f36e9 --- /dev/null +++ b/slycot/tests/test_ab13ed.py @@ -0,0 +1,18 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis +from slycot.exceptions import SlycotArithmeticError, SlycotResultWarning + +from .test_exceptions import assert_docstring_parse + + +class Test_ab13ed: + + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab13ed, SlycotArithmeticError, 1, {}),)) + def test_ab13ed_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) \ No newline at end of file diff --git a/slycot/tests/test_ab13fd.py b/slycot/tests/test_ab13fd.py new file mode 100644 index 00000000..68376f89 --- /dev/null +++ b/slycot/tests/test_ab13fd.py @@ -0,0 +1,19 @@ +import numpy as np +import pytest +from numpy.testing import assert_allclose, assert_array_equal, assert_equal +from scipy import linalg, signal + +from slycot import analysis +from slycot.exceptions import SlycotArithmeticError, SlycotResultWarning + +from .test_exceptions import assert_docstring_parse + + +class Test_ab13fd: + + @pytest.mark.parametrize( + 'fun, exception_class, erange, checkvars', + ((analysis.ab13fd, SlycotArithmeticError, (2,), {}), + (analysis.ab13fd, SlycotResultWarning, (1,), {}),)) + def test_ab13fd_docparse(self, fun, exception_class, erange, checkvars): + assert_docstring_parse(fun.__doc__, exception_class, erange, checkvars) \ No newline at end of file diff --git a/slycot/tests/test_ab13md.py b/slycot/tests/test_ab13md.py index 5a30f5ba..d306e2af 100644 --- a/slycot/tests/test_ab13md.py +++ b/slycot/tests/test_ab13md.py @@ -32,27 +32,26 @@ def slicot_example(): Z = np.reshape(Z, (n, n)) return Z, nblock, itype +class Test_ab13md: -def test_cached_inputoutput(): - # check x, cached working area, input and output, and error - Z, nblock, itype = slicot_example() + def test_cached_inputoutput(self): + # check x, cached working area, input and output, and error + Z, nblock, itype = slicot_example() - m = len(nblock) - mr = np.count_nonzero(1==itype) + m = len(nblock) + mr = np.count_nonzero(1==itype) - mu0, d0, g0, x0 = ab13md(Z, nblock, itype) - assert m+mr-1 == len(x0) + mu0, d0, g0, x0 = ab13md(Z, nblock, itype) + assert m+mr-1 == len(x0) - mu1, d1, g1, x1 = ab13md(Z, nblock, itype, x0) + mu1, d1, g1, x1 = ab13md(Z, nblock, itype, x0) - assert_allclose(mu1, mu0) + assert_allclose(mu1, mu0) - with pytest.raises(ValueError): - mu0, d, g, x = ab13md(Z, nblock, itype, np.ones(mr+mr)) + with pytest.raises(ValueError): + mu0, d, g, x = ab13md(Z, nblock, itype, np.ones(mr+mr)) -class TestReference: - # check a few reference cases def test_complex_scalar(self): # [1] (8.74) nblock = np.array([1]) diff --git a/slycot/tests/test_ag08bd.py b/slycot/tests/test_ag08bd.py index 97aa2b41..1cccecee 100644 --- a/slycot/tests/test_ag08bd.py +++ b/slycot/tests/test_ag08bd.py @@ -44,71 +44,72 @@ [ 0, -1, -2], [ 0, 0, 0]]) - -def test1_ag08bd(): - """test [A-lambda*E] - - B,C,D must have correct dimensions according to l,n,m and p, but cannot - have zero length in any dimenstion. Then the wrapper will complain. - The length is then set to one. - """ - - Af,Ef,nrank,niz,infz,kronr,infe,kronl = analysis.ag08bd(l=test1_l,n=test1_n,m=0,p=0,A=test1_A,E=test1_E,B=np.zeros((test1_l,1)),C=np.zeros((1,test1_n)),D=np.zeros((1,1)),equil=test1_equil, tol=test1_tol) - - assert_equal(Af, np.zeros((0,0))) - assert_equal(Ef, np.zeros((0,0))) - assert_equal(nrank, 9) - assert_equal(niz, 6) - assert_equal(infz, [0,3]) - assert_equal(kronr, []) - assert_equal(infe, [3,3,3]) - assert_equal(kronl, []) - -def test2_ag08bd(): - """test [A-lambda*E;C] - - B,D must have correct dimensions as before - """ - - Af,Ef,nrank,niz,infz,kronr,infe,kronl = analysis.ag08bd(l=test1_l,n=test1_n,m=0,p=test1_p,A=test1_A,E=test1_E,B=np.zeros((test1_l,1)),C=test1_C,D=np.zeros((test1_p,1)),equil=test1_equil, tol=test1_tol) - - assert_equal(Af, np.zeros((0,0))) - assert_equal(Ef, np.zeros((0,0))) - assert_equal(nrank, 9) - assert_equal(niz, 4) - assert_equal(infz, [0,2]) - assert_equal(kronr, []) - assert_equal(infe, [1,3,3]) - assert_equal(kronl, [0,1,1]) - -def test3_ag08bd(): - """test [A-lambda*E,B] - - C,D must have correct dimensions as before - """ - - Af,Ef,nrank,niz,infz,kronr,infe,kronl = analysis.ag08bd(l=test1_l,n=test1_n,m=test1_m,p=0,A=test1_A,E=test1_E,B=test1_B,C=np.zeros((1,test1_n)),D=np.zeros((1,test1_m)),equil=test1_equil, tol=test1_tol) - - assert_equal(Af, np.zeros((0,0))) - assert_equal(Ef, np.zeros((0,0))) - assert_equal(nrank, 9) - assert_equal(niz, 0) - assert_equal(infz, []) - assert_equal(kronr, [2,2,2]) - assert_equal(infe, [1,1,1]) - assert_equal(kronl, []) - -def test4_ag08bd(): - """test [A-lambda*E,B;C,D]""" - - Af,Ef,nrank,niz,infz,kronr,infe,kronl = analysis.ag08bd(l=test1_l,n=test1_n,m=test1_m,p=test1_p,A=test1_A,E=test1_E,B=test1_B,C=test1_C,D=test1_D,equil=test1_equil, tol=test1_tol) - - # Af-lambda*Ef==0. => lambda==1. => Finite Smith zero of S(lambda) == 1. - assert Af.shape == (1, 1) - assert_almost_equal(Af, Ef) - assert_equal(nrank, 11) - assert_equal(niz, 2) - assert_equal(infz, [0,1]) - assert_equal(kronr, [2]) - assert_equal(infe, [1,1,1,1,3]) - assert_equal(kronl, [1]) +class Test_ag08bd: + + def test_ag08bd_1(self): + """test [A-lambda*E] + + B,C,D must have correct dimensions according to l,n,m and p, but cannot + have zero length in any dimenstion. Then the wrapper will complain. + The length is then set to one. + """ + + Af,Ef,nrank,niz,infz,kronr,infe,kronl = analysis.ag08bd(l=test1_l,n=test1_n,m=0,p=0,A=test1_A,E=test1_E,B=np.zeros((test1_l,1)),C=np.zeros((1,test1_n)),D=np.zeros((1,1)),equil=test1_equil, tol=test1_tol) + + assert_equal(Af, np.zeros((0,0))) + assert_equal(Ef, np.zeros((0,0))) + assert_equal(nrank, 9) + assert_equal(niz, 6) + assert_equal(infz, [0,3]) + assert_equal(kronr, []) + assert_equal(infe, [3,3,3]) + assert_equal(kronl, []) + + def tes2_ag08bd_2(self): + """test [A-lambda*E;C] + + B,D must have correct dimensions as before + """ + + Af,Ef,nrank,niz,infz,kronr,infe,kronl = analysis.ag08bd(l=test1_l,n=test1_n,m=0,p=test1_p,A=test1_A,E=test1_E,B=np.zeros((test1_l,1)),C=test1_C,D=np.zeros((test1_p,1)),equil=test1_equil, tol=test1_tol) + + assert_equal(Af, np.zeros((0,0))) + assert_equal(Ef, np.zeros((0,0))) + assert_equal(nrank, 9) + assert_equal(niz, 4) + assert_equal(infz, [0,2]) + assert_equal(kronr, []) + assert_equal(infe, [1,3,3]) + assert_equal(kronl, [0,1,1]) + + def test_ag08bd_3(self): + """test [A-lambda*E,B] + + C,D must have correct dimensions as before + """ + + Af,Ef,nrank,niz,infz,kronr,infe,kronl = analysis.ag08bd(l=test1_l,n=test1_n,m=test1_m,p=0,A=test1_A,E=test1_E,B=test1_B,C=np.zeros((1,test1_n)),D=np.zeros((1,test1_m)),equil=test1_equil, tol=test1_tol) + + assert_equal(Af, np.zeros((0,0))) + assert_equal(Ef, np.zeros((0,0))) + assert_equal(nrank, 9) + assert_equal(niz, 0) + assert_equal(infz, []) + assert_equal(kronr, [2,2,2]) + assert_equal(infe, [1,1,1]) + assert_equal(kronl, []) + + def test_ag08bd_4(self): + """test [A-lambda*E,B;C,D]""" + + Af,Ef,nrank,niz,infz,kronr,infe,kronl = analysis.ag08bd(l=test1_l,n=test1_n,m=test1_m,p=test1_p,A=test1_A,E=test1_E,B=test1_B,C=test1_C,D=test1_D,equil=test1_equil, tol=test1_tol) + + # Af-lambda*Ef==0. => lambda==1. => Finite Smith zero of S(lambda) == 1. + assert Af.shape == (1, 1) + assert_almost_equal(Af, Ef) + assert_equal(nrank, 11) + assert_equal(niz, 2) + assert_equal(infz, [0,1]) + assert_equal(kronr, [2]) + assert_equal(infe, [1,1,1,1,3]) + assert_equal(kronl, [1])