title: MemoryError during Fast Fourier Transform on an image using NumPy arrays under Windows
body: <p>The code could compute Fourier transform from a <code>.tiff</code> image on my Ubuntu 11.04. On Windows XP it produces memory error. What to change? Thank you.</p>
  
  <pre><code>def fouriertransform(result):     #function for Fourier transform computation
      for filename in glob.iglob ('*.tif')
          imgfourier = scipy.misc.imread(filename) #read the image
          arrayfourier = numpy.array([imgfourier])#make an array 
          # Take the fourier transform of the image.
          F1 = fftpack.fft2(arrayfourier)
          # Now shift so that low spatial frequencies are in the center.
          F2 = fftpack.fftshift(F1)
          # the 2D power spectrum is:
          psd2D = np.abs(F2)**2
          L = psd2D
          np.set_printoptions(threshold=3)
          #np.set_printoptions(precision = 3, threshold = None, edgeitems = None, linewidth = 3, suppress = True, nanstr = None, infstr = None, formatter = None)
          for subarray in L:
              for array in subarray:
                  for array in subarray:
                      for elem in array:
                          print '%3.10f\n' % elem
  </code></pre>
  
  <p>The error output is:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Documents and Settings\HrenMudak\Мои документы\Моя музыка\fourier.py", line 27, in &lt;module&gt;
      F1 = fftpack.fft2(arrayfourier)
    File "C:\Python27\lib\site-packages\scipy\fftpack\basic.py", line 571, in fft2
      return fftn(x,shape,axes,overwrite_x)
    File "C:\Python27\lib\site-packages\scipy\fftpack\basic.py", line 521, in fftn
      return _raw_fftn_dispatch(x, shape, axes, overwrite_x, 1)
    File "C:\Python27\lib\site-packages\scipy\fftpack\basic.py", line 535, in _raw_fftn_dispatch
      return _raw_fftnd(tmp,shape,axes,direction,overwrite_x,work_function)
    File "C:\Python27\lib\site-packages\scipy\fftpack\basic.py", line 463, in _raw_fftnd
      x, copy_made = _fix_shape(x, s[i], waxes[i])
    File "C:\Python27\lib\site-packages\scipy\fftpack\basic.py", line 134, in _fix_shape
      z = zeros(s,x.dtype.char)
  MemoryError
  </code></pre>