title: Getting Value Error in Python function when calling signal.firwin
body: <p>I am using Least Square filter function in python which is <strong>firwin</strong> and it is in signal library and when i am calling the function it is raising Value Error.</p>
  
  <p>My Code Snippet:</p>
  
  <pre><code>Fs = 100
  
  epochs = n/Fs
  
  nyquist = Fs/2
  
  lower_filter_bound = 7;
  
  upper_filter_bound = 13;
  
  transition_width = 0.7;
  
  filter_order = np.round((Fs/lower_filter_bound))
  
  idealresponse = [ 0, 0, 1, 1, 0, 0 ];
  
  filterName = 'Band pass filtered';
  
  F = [0, (((1-transition_width)*lower_filter_bound)/nyquist), 
  (lower_filter_bound/nyquist),(upper_filter_bound/nyquist),(((1+transition_width)*upper_filter_bound)/nyquist), nyquist/nyquist];
  
  filterweights = sig.firwin(filter_order, F, idealresponse)
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "File.py", line 34, in &lt;module&gt;
      filterweights = sig.firwin(filter_order, F, idealresponse)
  
  raise ValueError("Invalid cutoff frequency: frequencies must be "
  ValueError: Invalid cutoff frequency: frequencies must be greater than 0 and less than nyq.
  </code></pre>