summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-12-20 10:38:57 -0700
committerCharles Harris <charlesr.harris@gmail.com>2015-12-20 10:38:57 -0700
commitdeaed3a5e45822047b30e85abba9f8928615f048 (patch)
tree916e84693e0a52a4ea557979b88198732421f622
parentcf3fa2d6cae8208a2f81dd70b0284c1546978e33 (diff)
parent44293bb2834f2a4495dacee4ba112a3bfeef5b0c (diff)
downloadnumpy-deaed3a5e45822047b30e85abba9f8928615f048.tar.gz
Merge pull request #6859 from charris/fixup-gh-6799
Fixup 6799, DOC: doc mistake in ifft - closes #6798.
-rw-r--r--numpy/fft/fftpack.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/numpy/fft/fftpack.py b/numpy/fft/fftpack.py
index 4ad4f6802..c3bb732b2 100644
--- a/numpy/fft/fftpack.py
+++ b/numpy/fft/fftpack.py
@@ -203,10 +203,16 @@ def ifft(a, n=None, axis=-1, norm=None):
see `numpy.fft`.
The input should be ordered in the same way as is returned by `fft`,
- i.e., ``a[0]`` should contain the zero frequency term,
- ``a[1:n/2+1]`` should contain the positive-frequency terms, and
- ``a[n/2+1:]`` should contain the negative-frequency terms, in order of
- decreasingly negative frequency. See `numpy.fft` for details.
+ i.e.,
+
+ * ``a[0]`` should contain the zero frequency term,
+ * ``a[1:n//2]`` should contain the positive-frequency terms,
+ * ``a[n//2 + 1:]`` should contain the negative-frequency terms, in
+ increasing order starting from the most negative frequency.
+
+ For an even number of input points, ``A[n//2]`` represents the sum of
+ the values at the positive and negative Nyquist frequencies, as the two
+ are aliased together. See `numpy.fft` for details.
Parameters
----------
@@ -263,9 +269,9 @@ def ifft(a, n=None, axis=-1, norm=None):
>>> n[40:60] = np.exp(1j*np.random.uniform(0, 2*np.pi, (20,)))
>>> s = np.fft.ifft(n)
>>> plt.plot(t, s.real, 'b-', t, s.imag, 'r--')
- [<matplotlib.lines.Line2D object at 0x...>, <matplotlib.lines.Line2D object at 0x...>]
+ ...
>>> plt.legend(('real', 'imaginary'))
- <matplotlib.legend.Legend object at 0x...>
+ ...
>>> plt.show()
"""