3636
3737import mkl_fft
3838
39- from .._fft_utils import _compute_fwd_scale , _swap_direction
39+ from .._fft_utils import _swap_direction
4040from ._float_utils import _downcast_float128_array
4141
4242__all__ = [
@@ -120,10 +120,9 @@ def fft(a, n=None, axis=-1, norm=None, out=None):
120120
121121 """
122122 x = _downcast_float128_array (a )
123- fsc = _compute_fwd_scale (norm , n , x .shape [axis ])
124123
125124 return _trycall (
126- mkl_fft .fft , (x ,), {"n" : n , "axis" : axis , "fwd_scale " : fsc , "out" : out }
125+ mkl_fft .fft , (x ,), {"n" : n , "axis" : axis , "norm " : norm , "out" : out }
127126 )
128127
129128
@@ -135,10 +134,9 @@ def ifft(a, n=None, axis=-1, norm=None, out=None):
135134
136135 """
137136 x = _downcast_float128_array (a )
138- fsc = _compute_fwd_scale (norm , n , x .shape [axis ])
139137
140138 return _trycall (
141- mkl_fft .ifft , (x ,), {"n" : n , "axis" : axis , "fwd_scale " : fsc , "out" : out }
139+ mkl_fft .ifft , (x ,), {"n" : n , "axis" : axis , "norm " : norm , "out" : out }
142140 )
143141
144142
@@ -171,10 +169,9 @@ def fftn(a, s=None, axes=None, norm=None, out=None):
171169 """
172170 x = _downcast_float128_array (a )
173171 s , axes = _cook_nd_args (x , s , axes )
174- fsc = _compute_fwd_scale (norm , s , x .shape )
175172
176173 return _trycall (
177- mkl_fft .fftn , (x ,), {"s" : s , "axes" : axes , "fwd_scale " : fsc , "out" : out }
174+ mkl_fft .fftn , (x ,), {"s" : s , "axes" : axes , "norm " : norm , "out" : out }
178175 )
179176
180177
@@ -187,12 +184,11 @@ def ifftn(a, s=None, axes=None, norm=None, out=None):
187184 """
188185 x = _downcast_float128_array (a )
189186 s , axes = _cook_nd_args (x , s , axes )
190- fsc = _compute_fwd_scale (norm , s , x .shape )
191187
192188 return _trycall (
193189 mkl_fft .ifftn ,
194190 (x ,),
195- {"s" : s , "axes" : axes , "fwd_scale " : fsc , "out" : out },
191+ {"s" : s , "axes" : axes , "norm " : norm , "out" : out },
196192 )
197193
198194
@@ -204,10 +200,9 @@ def rfft(a, n=None, axis=-1, norm=None, out=None):
204200
205201 """
206202 x = _downcast_float128_array (a )
207- fsc = _compute_fwd_scale (norm , n , x .shape [axis ])
208203
209204 return _trycall (
210- mkl_fft .rfft , (x ,), {"n" : n , "axis" : axis , "fwd_scale " : fsc , "out" : out }
205+ mkl_fft .rfft , (x ,), {"n" : n , "axis" : axis , "norm " : norm , "out" : out }
211206 )
212207
213208
@@ -219,12 +214,11 @@ def irfft(a, n=None, axis=-1, norm=None, out=None):
219214
220215 """
221216 x = _downcast_float128_array (a )
222- fsc = _compute_fwd_scale (norm , n , 2 * (x .shape [axis ] - 1 ))
223217
224218 return _trycall (
225219 mkl_fft .irfft ,
226220 (x ,),
227- {"n" : n , "axis" : axis , "fwd_scale " : fsc , "out" : out },
221+ {"n" : n , "axis" : axis , "norm " : norm , "out" : out },
228222 )
229223
230224
@@ -257,12 +251,11 @@ def rfftn(a, s=None, axes=None, norm=None, out=None):
257251 """
258252 x = _downcast_float128_array (a )
259253 s , axes = _cook_nd_args (x , s , axes )
260- fsc = _compute_fwd_scale (norm , s , x .shape )
261254
262255 return _trycall (
263256 mkl_fft .rfftn ,
264257 (x ,),
265- {"s" : s , "axes" : axes , "fwd_scale " : fsc , "out" : out },
258+ {"s" : s , "axes" : axes , "norm " : norm , "out" : out },
266259 )
267260
268261
@@ -276,12 +269,11 @@ def irfftn(a, s=None, axes=None, norm=None, out=None):
276269
277270 x = _downcast_float128_array (a )
278271 s , axes = _cook_nd_args (x , s , axes , invreal = True )
279- fsc = _compute_fwd_scale (norm , s , x .shape )
280272
281273 return _trycall (
282274 mkl_fft .irfftn ,
283275 (x ,),
284- {"s" : s , "axes" : axes , "fwd_scale " : fsc , "out" : out },
276+ {"s" : s , "axes" : axes , "norm " : norm , "out" : out },
285277 )
286278
287279
@@ -295,12 +287,10 @@ def hfft(a, n=None, axis=-1, norm=None, out=None):
295287 """
296288 norm = _swap_direction (norm )
297289 x = _downcast_float128_array (a )
298- fsc = _compute_fwd_scale (norm , n , 2 * (x .shape [axis ] - 1 ))
299-
300290 return _trycall (
301291 mkl_fft .irfft ,
302292 (np .conjugate (x ),),
303- {"n" : n , "axis" : axis , "fwd_scale " : fsc , "out" : out },
293+ {"n" : n , "axis" : axis , "norm " : norm , "out" : out },
304294 )
305295
306296
@@ -313,10 +303,9 @@ def ihfft(a, n=None, axis=-1, norm=None, out=None):
313303 """
314304 norm = _swap_direction (norm )
315305 x = _downcast_float128_array (a )
316- fsc = _compute_fwd_scale (norm , n , x .shape [axis ])
317306
318307 result = _trycall (
319- mkl_fft .rfft , (x ,), {"n" : n , "axis" : axis , "fwd_scale " : fsc , "out" : out }
308+ mkl_fft .rfft , (x ,), {"n" : n , "axis" : axis , "norm " : norm , "out" : out }
320309 )
321310
322311 np .conjugate (result , out = result )
0 commit comments