[Numpy-discussion] What does fftn take as parameters?

Roger Binns rogerb at rogerbinns.com
Tue Dec 6 02:49:48 EST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/12/11 14:19, David Cournapeau wrote:
> I am not I understand what you are trying to do ?

I had a slight misunderstanding with the math guy and had believed that
for our purposes we could feed in 16 columns and get one "column" of fft
output. However we do actually need 16 columns of output, each
corresponding to a column of input.

It seems he is obsessed with optimisation and apparently when calculating
an fft of a known size it would save some redundant calculations operating
on all 16 columns at once rather than doing them one at a time. That is
what he assumed fftn did from the description.

> numpy.fft.fft will compute fft on every *row*, or every column if you
> say pass axis=0 argument:

Note that I am using regular Python lists (they were JSON at one point)
and the fft documentation is incomprehensible to someone who hasn't used
numpy before and only cares about fft (there are a lot of matches for
Google searches about fft and python pointing to numpy).

The doc doesn't actually say what axis is and doesn't have an example.
Additionally a "shape" attribute is used which is peculiar to whatever
numpy uses as its data representation.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk7dyRwACgkQmOOfHg372QToxgCfR7IoUfgGQVZEEiElnjbtx7yx
R8EAnRfDg4y7AfFeSA8sQxVCq6ucgRG1
=gg2h
-----END PGP SIGNATURE-----



More information about the NumPy-Discussion mailing list