def _other_dpss_method(N, NW, Kmax):
<EOL>from scipy import linalg as la<EOL>Kmax = int(Kmax)<EOL>W = float(NW)/N<EOL>ab = np.zeros((<NUM_LIT:2>,N), '<STR_LIT:d>')<EOL>nidx = np.arange(N)<EOL>ab[<NUM_LIT:0>,<NUM_LIT:1>:] = nidx[<NUM_LIT:1>:]*(N-nidx[<NUM_LIT:1>:])/<NUM_LIT><EOL>ab[<NUM_LIT:1>] = ((N-<NUM_LIT:1>-<NUM_LIT:2>*nidx)/<NUM_LIT>)**<NUM_LIT:2> * np.cos(<NUM_LIT:2>*np.pi*W)<EOL>l,v = la.eig_banded(ab, select='<STR_LIT:i>', select_range=(N-Kmax, N-<NUM_LIT:1>))<EOL>dpss = v.transpose()[::-<NUM_LIT:1>]<EOL>fix_symmetric = (dpss[<NUM_LIT:0>::<NUM_LIT:2>].sum(axis=<NUM_LIT:1>) < <NUM_LIT:0>)<EOL>for i, f in enumerate(fix_symmetric):<EOL><INDENT>if f:<EOL><INDENT>dpss[<NUM_LIT:2>*i] *= -<NUM_LIT:1><EOL><DEDENT><DEDENT>fix_skew = (dpss[<NUM_LIT:1>::<NUM_LIT:2>,<NUM_LIT:1>] < <NUM_LIT:0>)<EOL>for i, f in enumerate(fix_skew):<EOL><INDENT>if f:<EOL><INDENT>dpss[<NUM_LIT:2>*i+<NUM_LIT:1>] *= -<NUM_LIT:1><EOL><DEDENT><DEDENT>acvs = _autocov(dpss, debias=False) * N<EOL>r = <NUM_LIT:4>*W*np.sinc(<NUM_LIT:2>*W*nidx)<EOL>r[<NUM_LIT:0>] = <NUM_LIT:2>*W<EOL>eigvals = np.dot(acvs, r)<EOL>return dpss, eigvals<EOL>
Returns the Discrete Prolate Spheroidal Sequences of orders [0,Kmax-1]
    for a given frequency-spacing multiple NW and sequence length N.

    See dpss function that is the official version. This version is indepedant
    of the C code and relies on Scipy function. However, it is slower by a factor 3

    Tridiagonal form of DPSS calculation from: