def test_dpss_properties():

    N = 2000
    NW = 200
    d, lam = tsa.dpss_windows(N, NW, 2*NW-2)
    # 2NW-2 lamdas should be all > 0.9
    nt.assert_true(
        (lam > 0.9).all(), 'Eigenvectors show poor spectral concentration'
        )
    # test orthonomality
    err = np.linalg.norm(d.dot(d.T) - np.eye(2*NW-2), ord='fro')
    nt.assert_true(err**2 < 1e-16, 'Eigenvectors not numerically orthonormal')
    # test positivity of even functions
    nt.assert_true(
        (d[::2].sum(axis=1) > 0).all(),
        'Even Slepian sequences should have positive DC'
        )
    # test positive initial slope of odd functions
    # (this tests the sign of a linear slope)
    pk = np.argmax(np.abs(d[1::2, :N//2]), axis=1)
    t = True
    for p, f in zip(pk, d[1::2]):
        t = t and np.sum( np.arange(1,p+1) * f[:p] ) >= 0
    nt.assert_true(t, 'Odd Slepians should begin positive-going')
args:
dataset/ETHPy150Open nipy/nitime/nitime/algorithms/tests/test_spectral.py/test_dpss_properties--crossover with--dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/contrib/mockimaplib.py/Connection.search