|
1 | 1 | from ._types import Tuple, Union, Sequence, array, Optional, Literal |
2 | 2 |
|
| 3 | + |
3 | 4 | def fft(x: array, /, *, n: Optional[int] = None, axis: int = -1, norm: Literal['backward', 'ortho', 'forward'] = 'backward') -> array: |
4 | 5 | """ |
5 | 6 | Computes the one-dimensional discrete Fourier transform. |
@@ -42,6 +43,9 @@ def ifft(x: array, /, *, n: Optional[int] = None, axis: int = -1, norm: Literal[ |
42 | 43 | """ |
43 | 44 | Computes the one-dimensional inverse discrete Fourier transform. |
44 | 45 |
|
| 46 | + .. note:: |
| 47 | + Applying the one-dimensional inverse discrete Fourier transform to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``ifft(fft(x)) == x``), provided that the transform and inverse transform are performed with the same normalization mode. |
| 48 | +
|
45 | 49 | Parameters |
46 | 50 | ---------- |
47 | 51 | x: array |
@@ -77,9 +81,8 @@ def fftn(x: array, /, *, s: Sequence[int] = None, axes: Sequence[int] = None, no |
77 | 81 | """ |
78 | 82 | Computes the n-dimensional discrete Fourier transform. |
79 | 83 |
|
80 | | -
|
81 | 84 | .. note:: |
82 | | - Applying the n-dimensional inverse discrete Fourier transform to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``ifftn(fftn(x)) == x``), provided that the transform and inverse transform are performed with the same normalization mode.. |
| 85 | + Applying the n-dimensional inverse discrete Fourier transform to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``ifftn(fftn(x)) == x``), provided that the transform and inverse transform are performed with the same normalization mode. |
83 | 86 |
|
84 | 87 | Parameters |
85 | 88 | ---------- |
@@ -121,6 +124,9 @@ def ifftn(x: array, /, *, s: Sequence[int] = None, axes: Sequence[int] = None, n |
121 | 124 | """ |
122 | 125 | Computes the n-dimensional inverse discrete Fourier transform. |
123 | 126 |
|
| 127 | + .. note:: |
| 128 | + Applying the n-dimensional inverse discrete Fourier transform to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``ifftn(fftn(x)) == x``), provided that the transform and inverse transform are performed with the same normalization mode. |
| 129 | +
|
124 | 130 | Parameters |
125 | 131 | ---------- |
126 | 132 | x: array |
@@ -156,9 +162,8 @@ def rfft(x: array, /, *, n: Optional[int] = None, axis: int = -1, norm: Literal[ |
156 | 162 | """ |
157 | 163 | Computes the one-dimensional discrete Fourier transform for real-valued input. |
158 | 164 |
|
159 | | -
|
160 | 165 | .. note:: |
161 | | - Applying the one-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfft(rfft(x), n=x.shape[axis]) == x``), provided that the transform and inverse transform are performed with the same normalization mode.. |
| 166 | + Applying the one-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfft(rfft(x), n=x.shape[axis]) == x``), provided that the transform and inverse transform are performed with the same normalization mode. |
162 | 167 |
|
163 | 168 | Parameters |
164 | 169 | ---------- |
@@ -195,6 +200,9 @@ def irfft(x: array, /, *, n: Optional[int] = None, axis: int = -1, norm: Literal |
195 | 200 | """ |
196 | 201 | Computes the one-dimensional inverse of ``rfft``. |
197 | 202 |
|
| 203 | + .. note:: |
| 204 | + Applying the one-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfft(rfft(x), n=x.shape[axis]) == x``), provided that the transform and inverse transform are performed with the same normalization mode. |
| 205 | +
|
198 | 206 | Parameters |
199 | 207 | ---------- |
200 | 208 | x: array |
@@ -230,7 +238,6 @@ def rfftn(x: array, /, *, s: Sequence[int] = None, axes: Sequence[int] = None, n |
230 | 238 | """ |
231 | 239 | Computes the n-dimensional discrete Fourier transform for real-valued input. |
232 | 240 |
|
233 | | -
|
234 | 241 | .. note:: |
235 | 242 | Applying the n-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfftn(rfftn(x), n=x.shape[axis]) == x``), provided that the transform and inverse transform are performed with the same normalization mode. |
236 | 243 |
|
@@ -269,6 +276,9 @@ def irfftn(x: array, /, *, s: Sequence[int] = None, axes: Sequence[int] = None, |
269 | 276 | """ |
270 | 277 | Computes the n-dimensional inverse of ``rfftn``. |
271 | 278 |
|
| 279 | + .. note:: |
| 280 | + Applying the n-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfftn(rfftn(x), n=x.shape[axis]) == x``), provided that the transform and inverse transform are performed with the same normalization mode. |
| 281 | +
|
272 | 282 | Parameters |
273 | 283 | ---------- |
274 | 284 | x: array |
|
0 commit comments