On Tue, 2012-02-07 at 01:04 +0100, Torgil Svensson wrote:
irfftn is an optimization for real input and does not take complex
input. You have to use numpy.fft.ifftn instead:
hmmm, that doesn't sound right to me (though there could be some non
obvious DFT magic that I'm missing). Indeed,
On Tue, 2012-02-07 at 09:15 +, Henry Gomersall wrote:
On Tue, 2012-02-07 at 01:04 +0100, Torgil Svensson wrote:
irfftn is an optimization for real input and does not take complex
input. You have to use numpy.fft.ifftn instead:
hmmm, that doesn't sound right to me (though there could
On Tue, 2012-02-07 at 09:15 +, Henry Gomersall wrote:
numpy.fft.ifftn(a, axes=axes)
Or do you mean if the error message is expected?
Yeah, the question was regarding the error message. Specifically, the
problem it seems to have with an axes argument like that.
Sorry, the error
On Tue, 7 Feb 2012, Henry Gomersall wrote:
On Tue, 2012-02-07 at 01:04 +0100, Torgil Svensson wrote:
irfftn is an optimization for real input and does not take complex
input. You have to use numpy.fft.ifftn instead:
hmmm, that doesn't sound right to me (though there could be some non
On Tue, 2012-02-07 at 11:53 -0800, Warren Focke wrote:
You're not doing anything wrong.
irfftn takes complex input and returns real output.
The exception is a bug which is triggered because max(axes) =
len(axes).
Is this a bug I should register?
Cheers,
Henry
On Tue, 7 Feb 2012, Henry Gomersall wrote:
On Tue, 2012-02-07 at 11:53 -0800, Warren Focke wrote:
You're not doing anything wrong.
irfftn takes complex input and returns real output.
The exception is a bug which is triggered because max(axes) =
len(axes).
Is this a bug I should register?
On Tue, 2012-02-07 at 12:26 -0800, Warren Focke wrote:
Is this a bug I should register?
Yes.
It should work right if you replace
s[axes[-1]] = (s[axes[-1]] - 1) * 2
with
s[-1] = (a.shape[axes[-1]] - 1) * 2
but I'm not really in a position to test it right now.
I can confirm
On Tue, 7 Feb 2012, Henry Gomersall wrote:
On Tue, 2012-02-07 at 12:26 -0800, Warren Focke wrote:
Is this a bug I should register?
Yes.
It should work right if you replace
s[axes[-1]] = (s[axes[-1]] - 1) * 2
with
s[-1] = (a.shape[axes[-1]] - 1) * 2
but I'm not really in a
irfftn is an optimization for real input and does not take complex
input. You have to use numpy.fft.ifftn instead:
import numpy
a_shape = (63, 4, 98)
a = numpy.complex128(numpy.random.rand(*a_shape)+\
... 1j*numpy.random.rand(*a_shape))
axes = [0, 2]
numpy.fft.ifftn(a, axes=axes)
Or