code: def lpc(blk, order=None):
    
    from numpy import matrix
    from numpy.linalg import pinv
  
    lagm = lag_matrix(blk, order)
    phi = matrix(lagm)
    psi = phi[1:, 0]
    coeffs = pinv(phi[1:, 1:]) * -psi
    coeffs = coeffs.T.tolist()[0]
    filt = 1  + sum(ai * z ** -i for i, ai in enumerate(coeffs, 1))
    filt.error = phi[0, 0] + sum(a * c for a, c in xzip(lagm[0][1:], coeffs))
    return filt
docs: Find the Linear Predictive Coding (LPC) coefficients as a ZFilter object,
    the analysis whitening filter. This implementation uses the covariance
    method, assuming a zero-mean stochastic process, using numpy.linalg.pinv
    as a linear system solver.