FFT for ndarrays