Discrete fourier transform in python