Re: [SciPy-user] in-place data permutation
Hello, I'm looking for an efficient implementation of permuting the positions of data in an array which doesn't require copying the array. Specifically, I am shifting an array by half its length along the 0th dimension, in order to put "textbook" ordered frequency data into the packed format expected by inverse_fft. I'm surprised this is not already implemented in numpy... seems like it would be a common need. Am I missing something obvious? Brian Hawthorne UC Berkeley Brain Imaging Center
Brian Hawthorne wrote:
Hello, I'm looking for an efficient implementation of permuting the positions of data in an array which doesn't require copying the array. Specifically, I am shifting an array by half its length along the 0th dimension, in order to put "textbook" ordered frequency data into the packed format expected by inverse_fft. I'm surprised this is not already implemented in numpy... seems like it would be a common need. Am I missing something obvious?
dft.fftfreq dft.fftshift dft.ifftshift -Travis
participants (2)
-
Brian Hawthorne -
Travis Oliphant