@@ -84,7 +84,7 @@ def _matvec(self, x):
8484 return y
8585
8686 def _rmatvec (self , x ):
87- x = np .reshape (x , self .dims_fft )
87+ x = np .reshape (x , self .dimsd )
8888 if self .fftshift_after :
8989 x = np .fft .ifftshift (x , axes = self .axis )
9090 if self .real :
@@ -175,7 +175,7 @@ def _matvec(self, x):
175175 return y
176176
177177 def _rmatvec (self , x ):
178- x = np .reshape (x , self .dims_fft )
178+ x = np .reshape (x , self .dimsd )
179179 if self .fftshift_after :
180180 x = scipy .fft .ifftshift (x , axes = self .axis )
181181 if self .real :
@@ -255,29 +255,30 @@ def __init__(
255255 f"fftw backend returns complex128 dtype. To respect the passed dtype, data will be cast to { self .cdtype } ."
256256 )
257257
258- self .dims_t = self .dims .copy ()
259- self .dims_t [self .axis ] = self .nfft
258+ dims_t = list (self .dims )
259+ dims_t [self .axis ] = self .nfft
260+ self .dims_t = dims_t
260261
261262 # define padding(fftw requires the user to provide padded input signal)
262263 self .pad = np .zeros ((self .ndim , 2 ), dtype = int )
263264 if self .real :
264265 if self .nfft % 2 :
265266 self .pad [self .axis , 1 ] = (
266- 2 * (self .dims_fft [self .axis ] - 1 ) + 1 - self .dims [self .axis ]
267+ 2 * (self .dimsd [self .axis ] - 1 ) + 1 - self .dims [self .axis ]
267268 )
268269 else :
269270 self .pad [self .axis , 1 ] = (
270- 2 * (self .dims_fft [self .axis ] - 1 ) - self .dims [self .axis ]
271+ 2 * (self .dimsd [self .axis ] - 1 ) - self .dims [self .axis ]
271272 )
272273 else :
273- self .pad [self .axis , 1 ] = self .dims_fft [self .axis ] - self .dims [self .axis ]
274+ self .pad [self .axis , 1 ] = self .dimsd [self .axis ] - self .dims [self .axis ]
274275 self .dopad = True if np .sum (self .pad ) > 0 else False
275276
276277 # create empty arrays and plans for fft/ifft
277278 self .x = pyfftw .empty_aligned (
278279 self .dims_t , dtype = self .rdtype if real else self .cdtype
279280 )
280- self .y = pyfftw .empty_aligned (self .dims_fft , dtype = self .cdtype )
281+ self .y = pyfftw .empty_aligned (self .dimsd , dtype = self .cdtype )
281282
282283 # Use FFTW without norm-related keywords above. In this case, FFTW standard
283284 # behavior is to scale with 1/N on the inverse transform. The _scale below
@@ -327,7 +328,7 @@ def _matvec(self, x):
327328 return y .ravel ()
328329
329330 def _rmatvec (self , x ):
330- x = np .reshape (x , self .dims_fft )
331+ x = np .reshape (x , self .dimsd )
331332 if self .fftshift_after :
332333 x = np .fft .ifftshift (x , axes = self .axis )
333334
@@ -479,10 +480,14 @@ def FFT(
479480
480481 Attributes
481482 ----------
482- dims_fft : :obj:`tuple`
483+ dimsd : :obj:`tuple`
483484 Shape of the array after the forward, but before linearization.
484485
485- For example, ``y_reshaped = (Op * x.ravel()).reshape(Op.dims_fft)``.
486+ For example, ``y_reshaped = (Op * x.ravel()).reshape(Op.dimsd)``.
487+ dims_fft : :obj:`tuple`
488+
489+ .. deprecated:: 2.0.0
490+ Use ``dimsd`` instead.
486491 f : :obj:`numpy.ndarray`
487492 Discrete Fourier Transform sample frequencies
488493 real : :obj:`bool`
0 commit comments