@@ -84,9 +84,9 @@ def _rmatvec(self, x):
8484 y = np .fft .ifftn (x , s = self .nffts , axes = self .axes , ** self ._norm_kwargs )
8585 if self .norm is _FFTNorms .NONE :
8686 y *= self ._scale
87- for direction , nfft in zip (self .axes , self .nffts ):
88- if nfft > self .dims [direction ]:
89- y = np .take (y , range (self .dims [direction ]), axis = direction )
87+ for ax , nfft in zip (self .axes , self .nffts ):
88+ if nfft > self .dims [ax ]:
89+ y = np .take (y , range (self .dims [ax ]), axis = ax )
9090 if self .doifftpad :
9191 y = np .pad (y , self .ifftpad )
9292 if not self .clinear :
@@ -172,9 +172,9 @@ def _rmatvec(self, x):
172172 y = scipy .fft .ifftn (x , s = self .nffts , axes = self .axes , ** self ._norm_kwargs )
173173 if self .norm is _FFTNorms .NONE :
174174 y *= self ._scale
175- for direction , nfft in zip (self .axes , self .nffts ):
176- if nfft > self .dims [direction ]:
177- y = np .take (y , range (self .dims [direction ]), axis = direction )
175+ for ax , nfft in zip (self .axes , self .nffts ):
176+ if nfft > self .dims [ax ]:
177+ y = np .take (y , range (self .dims [ax ]), axis = ax )
178178 if self .doifftpad :
179179 y = np .pad (y , self .ifftpad )
180180 if not self .clinear :
@@ -222,7 +222,7 @@ def FFTND(
222222 :math:`1 / \sqrt{2}` for the same frequencies.
223223
224224 For a real valued input signal, it is advised to use the flag ``real=True``
225- as it stores the values of the Fourier transform of the last direction at positive
225+ as it stores the values of the Fourier transform of the last axis in ``axes`` at positive
226226 frequencies only as values at negative frequencies are simply their complex conjugates.
227227
228228 Parameters
@@ -240,12 +240,12 @@ def FFTND(
240240 instead of (0, 1, 2) which was the default for ``dirs``.
241241
242242 nffts : :obj:`tuple` or :obj:`int`, optional
243- Number of samples in Fourier Transform for each direction . In case only one
243+ Number of samples in Fourier Transform for each axis in ``axes`` . In case only one
244244 dimension needs to be specified, use ``None`` for the other dimension in the
245- tuple. The direction with None will use ``dims[axis]`` for each ``axis`` in
246- ``axes`` as ``nffts``. When supplying a tuple, the order must agree with that
247- of ``axes``. When a single value is passed, it will be used for both
248- directions . As such the default is equivalent to ``nffts=(None, ..., None)``.
245+ tuple. An axis with `` None`` will use ``dims[axis]`` as ``nfft``.
246+ When supplying a tuple, the length must agree with that
247+ of ``axes``. When a single value is passed, it will be used for all
248+ ``axes` . As such the default is equivalent to ``nffts=(None, ..., None)``.
249249 sampling : :obj:`tuple` or :obj:`float`, optional
250250 Sampling steps for each direction. When supplied a single value, it is used
251251 for all directions. Unlike ``nffts``, any ``None`` will not be converted to the
0 commit comments