diff options
author | Gregory R. Lee <gregory.lee@cchmc.org> | 2017-01-03 19:22:13 -0500 |
---|---|---|
committer | Gregory R. Lee <gregory.lee@cchmc.org> | 2017-01-04 18:26:13 -0500 |
commit | bdd318bc00e1c0ba68ca81b3603f3d3cdaa0a10c (patch) | |
tree | 19c803de7da2279423cca2f8d6b1874a840eec01 /numpy/fft/fftpack.py | |
parent | b94c2b01ff7ef5b8dc44726512cfa232e9054882 (diff) | |
download | numpy-bdd318bc00e1c0ba68ca81b3603f3d3cdaa0a10c.tar.gz |
BUG: correct norm='ortho' scaling for rfft when n != None
closes #8444
Diffstat (limited to 'numpy/fft/fftpack.py')
-rw-r--r-- | numpy/fft/fftpack.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/fft/fftpack.py b/numpy/fft/fftpack.py index 7486ff51e..bd116b9cb 100644 --- a/numpy/fft/fftpack.py +++ b/numpy/fft/fftpack.py @@ -371,7 +371,9 @@ def rfft(a, n=None, axis=-1, norm=None): output = _raw_fft(a, n, axis, fftpack.rffti, fftpack.rfftf, _real_fft_cache) if _unitary(norm): - output *= 1 / sqrt(a.shape[axis]) + if n is None: + n = a.shape[axis] + output *= 1 / sqrt(n) return output |