def find_lpc_qr(D, d):
    L = D.shape[0]
    m = D.shape[1]
    q, r = scipy.linalg.qr(D)
    q, r = np.mat(q), np.mat(r)

    # SPEED
    # the next line is slow and the use of pinv2 should be avoided as
    # pseudo inversion of r involves a computationally expensive SVD
    # decomposition which is not needed.  Rather r*x = q.H*d should be
    # solved for x using LAPACK's ZTRTRS function (or similar function with
    # different prefix).  This is not currently available in scipy/numpy and
    # therefore is not used here.
    return scipy.linalg.pinv2(r) * q.H * d
Find linear prediction filter using QR decomposition.
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/process/proc_lp.py/find_lpc_qr