Fixed a small bug in average.py.
Updated grid to grid the data the way that an FFT wants the data to be gridded.