title: fft bandpass filter in python
body: <p>What I try is to filter my data with fft. I have a noisy signal recorded with 500Hz as a 1d- array. My high-frequency should cut off with 20Hz and my low-frequency with 10Hz.
  What I have tried is: </p>
  
  <pre><code>fft=scipy.fft(signal) 
  bp=fft[:]  
  for i in range(len(bp)): 
      if not 10&lt;i&lt;20:
          bp[i]=0
  
  ibp=scipy.ifft(bp)
  </code></pre>
  
  <p>What I get now are complex numbers. So something must be wrong. What? How can I correct my code?</p>