title: Audio buffer finite error after butter filtering (Scipy)
body: <p>I have an audio signal which I pass through a <code>butter</code> bandpass filter:</p>
  
  <pre><code>def bandpass_filter(y, sr, lowcut, highcut):
    # Setup parameters.
    nyquist_rate = sr / 2.
    filter_order = 1001
    normalized_low = lowcut / nyquist_rate
    normalized_high = highcut / nyquist_rate
  
    b, a = butter(filter_order, [normalized_low, normalized_high], btype='bandpass')
  
    y = lfilter(b, a, y)
    return y
  </code></pre>
  
  <p>I then use this returned, filtered signal to detect some pitches using a library called <a href="http://librosa.github.io/librosa/" rel="nofollow noreferrer">Librosa</a>.</p>
  
  <p>When I call:</p>
  
  <pre><code>  pitches, magnitudes = librosa.piptrack(y=y, sr=sr, fmin=fmin, fmax=fmax)
  </code></pre>
  
  <p>Where <code>y</code> is the filtered audio signal, I get this error:</p>
  
  <pre><code>librosa.util.exceptions.ParameterError
  ParameterError: Audio buffer is not finite everywhere
  </code></pre>
  
  <p>Which basically comes from this check:</p>
  
  <pre><code>if not np.isfinite(y).all():
      raise ParameterError('Audio buffer is not finite everywhere')
  </code></pre>
  
  <p>Why did this happen?</p>