code: def lpc(signal, order, axis=-1):
      
      n = signal.shape[axis]
      if order > n:
          raise ValueError("Input signal must have length >= order")
  
      r = acorr_lpc(signal, axis)
      return levinson_1d(r, order)
docs: Compute the Linear Prediction Coefficients.
  
      Return the order + 1 LPC coefficients for the signal. c = lpc(x, k) will
      find the k+1 coefficients of a k order linear filter:
  
        xp[n] = -c[1] * x[n-2] - ... - c[k-1] * x[n-k-1]
  
      Such as the sum of the squared-error e[i] = xp[i] - x[i] is minimized.
  
      Parameters
      ----------
      signal: array_like
          input signal
      order : int
          LPC order (the output will have order + 1 items)
  
      Returns
      -------
      a : array-like
          the solution of the inversion.
      e : array-like
          the prediction error.
      k : array-like
          reflection coefficients.
  
      Notes
      -----
      This uses Levinson-Durbin recursion for the autocorrelation matrix
      inversion, and fft for the autocorrelation computation.
  
      For small order, particularly if order << signal size, direct computation
      of the autocorrelation is faster: use levinson and correlate in this case.