code: def lfilter(coefficients, timeseries):
      
      from pycbc.filter import correlate
  
      # If there aren't many points just use the default scipy method
      if len(timeseries) < 2**7:
          if hasattr(timeseries, 'numpy'):
              timeseries = timeseries.numpy()
          series = scipy.signal.lfilter(coefficients, 1.0, timeseries)
          return series
      else:
          cseries = (Array(coefficients[::-1] * 1)).astype(timeseries.dtype)
          cseries.resize(len(timeseries))
          cseries.roll(len(timeseries) - len(coefficients) + 1)
          timeseries = Array(timeseries, copy=False)
  
          flen = len(cseries) / 2 + 1
          ftype = complex_same_precision_as(timeseries)
  
          cfreq = zeros(flen, dtype=ftype)
          tfreq = zeros(flen, dtype=ftype)
  
          fft(Array(cseries), cfreq)
          fft(Array(timeseries), tfreq)
  
          cout = zeros(flen, ftype)
          out = zeros(len(timeseries), dtype=timeseries)
  
          correlate(cfreq, tfreq, cout)
          ifft(cout, out)
  
          return out.numpy()  / len(out)
docs: Apply filter coefficients to a time series
  
      Parameters
      ----------
      coefficients: numpy.ndarray
          Filter coefficients to apply
      timeseries: numpy.ndarray
          Time series to be filtered.
  
      Returns
      -------
      tseries: numpy.ndarray
          filtered array