@@ -139,12 +139,12 @@ def ifftn_centered_t(ksp: Tensor, spatial_dims: int, is_complex: bool = True) ->
139139 output2 = ifftn_centered(ksp, spatial_dims=2, is_complex=True)
140140 """
141141 # define spatial dims to perform ifftshift, fftshift, and ifft
142- shift = [ i for i in range (- spatial_dims , 0 )] # noqa: C416
142+ shift = list ( range (- spatial_dims , 0 ))
143143 if is_complex :
144144 if ksp .shape [- 1 ] != 2 :
145145 raise ValueError (f"ksp.shape[-1] is not 2 ({ ksp .shape [- 1 ]} )." )
146- shift = [ i for i in range (- spatial_dims - 1 , - 1 )] # noqa: C416
147- dims = [ i for i in range (- spatial_dims , 0 )] # noqa: C416
146+ shift = list ( range (- spatial_dims - 1 , - 1 ))
147+ dims = list ( range (- spatial_dims , 0 ))
148148
149149 x = ifftshift (ksp , shift )
150150
@@ -187,12 +187,12 @@ def fftn_centered_t(im: Tensor, spatial_dims: int, is_complex: bool = True) -> T
187187 output2 = fftn_centered(im, spatial_dims=2, is_complex=True)
188188 """
189189 # define spatial dims to perform ifftshift, fftshift, and fft
190- shift = [ i for i in range (- spatial_dims , 0 )] # noqa: C416
190+ shift = list ( range (- spatial_dims , 0 ))
191191 if is_complex :
192192 if im .shape [- 1 ] != 2 :
193193 raise ValueError (f"img.shape[-1] is not 2 ({ im .shape [- 1 ]} )." )
194- shift = [ i for i in range (- spatial_dims - 1 , - 1 )] # noqa: C416
195- dims = [ i for i in range (- spatial_dims , 0 )] # noqa: C416
194+ shift = list ( range (- spatial_dims - 1 , - 1 ))
195+ dims = list ( range (- spatial_dims , 0 ))
196196
197197 x = ifftshift (im , shift )
198198
0 commit comments