title: How to get the FFT of a numpy array to work?
body: <p>I'm reading a specific column of a csv file as a numpy array. When I try to do the fft of this array I get an array of NaNs. How do I get the fft to work? Here's what I have so far:</p>
  
  <pre><code>#!/usr/bin/env python
  from __future__ import division
  
  import numpy as np
  from numpy import fft
  
  import matplotlib.pyplot as plt
  
  
  fileName = '/Users/Name/Documents/file.csv'
  
  #read csv file
  df = np.genfromtxt(fileName, dtype = float, delimiter = ',', names = True)
  
  X = df['X'] #get X from file
  
  rate = 1000. #rate of data collection in points per second
  Hx = abs(fft.fft(X))
  freqX = fft.fftfreq(len(Hx), 1/rate)
  
  plt.plot(freqX,Hx) #plot freqX vs Hx
  </code></pre>