@@ -408,12 +408,12 @@ def _fft1d_impl(x, n=None, axis=-1, overwrite_arg=False, direction=+1, double fs
408
408
return f_arr
409
409
410
410
411
- def rfft (x , n = None , axis = - 1 , overwrite_x = False , fwd_scale = 1.0 ):
411
+ def rfftpack (x , n = None , axis = - 1 , overwrite_x = False , fwd_scale = 1.0 ):
412
412
"""Packed real-valued harmonics of FFT of a real sequence x"""
413
413
return _rr_fft1d_impl2 (x , n = n , axis = axis , overwrite_arg = overwrite_x , fsc = fwd_scale )
414
414
415
415
416
- def irfft (x , n = None , axis = - 1 , overwrite_x = False , fwd_scale = 1.0 ):
416
+ def irfftpack (x , n = None , axis = - 1 , overwrite_x = False , fwd_scale = 1.0 ):
417
417
"""Inverse FFT of a real sequence, takes packed real-valued harmonics of FFT"""
418
418
return _rr_ifft1d_impl2 (x , n = n , axis = axis , overwrite_arg = overwrite_x , fsc = fwd_scale )
419
419
@@ -524,7 +524,7 @@ def _rr_fft1d_impl2(x, n=None, axis=-1, overwrite_arg=False, double fsc=1.0):
524
524
"""
525
525
Uses MKL to perform real packed 1D FFT on the input array x along the given axis.
526
526
527
- This done by using rfft_numpy and post-processing the result.
527
+ This done by using rfft and post-processing the result.
528
528
Thus overwrite_arg is effectively discarded.
529
529
530
530
Functionally equivalent to scipy.fftpack.rfft
@@ -580,7 +580,7 @@ def _rr_ifft1d_impl2(x, n=None, axis=-1, overwrite_arg=False, double fsc=1.0):
580
580
"""
581
581
Uses MKL to perform real packed 1D FFT on the input array x along the given axis.
582
582
583
- This done by using rfft_numpy and post-processing the result.
583
+ This done by using rfft and post-processing the result.
584
584
Thus overwrite_arg is effectively discarded.
585
585
586
586
Functionally equivalent to scipy.fftpack.irfft
@@ -793,11 +793,11 @@ def _rc_ifft1d_impl(x, n=None, axis=-1, overwrite_arg=False, double fsc=1.0):
793
793
return f_arr
794
794
795
795
796
- def rfft_numpy (x , n = None , axis = - 1 , fwd_scale = 1.0 ):
796
+ def rfft (x , n = None , axis = - 1 , fwd_scale = 1.0 ):
797
797
return _rc_fft1d_impl (x , n = n , axis = axis , fsc = fwd_scale )
798
798
799
799
800
- def irfft_numpy (x , n = None , axis = - 1 , fwd_scale = 1.0 ):
800
+ def irfft (x , n = None , axis = - 1 , fwd_scale = 1.0 ):
801
801
return _rc_ifft1d_impl (x , n = n , axis = axis , fsc = fwd_scale )
802
802
803
803
@@ -1121,12 +1121,12 @@ def ifftn(x, shape=None, axes=None, overwrite_x=False, fwd_scale=1.0):
1121
1121
return _fftnd_impl (x , shape = shape , axes = axes , overwrite_x = overwrite_x , direction = - 1 , fsc = fwd_scale )
1122
1122
1123
1123
1124
- def rfft2_numpy (x , s = None , axes = (- 2 ,- 1 ), fwd_scale = 1.0 ):
1125
- return rfftn_numpy (x , s = s , axes = axes , fsc = fwd_scale )
1124
+ def rfft2 (x , s = None , axes = (- 2 ,- 1 ), fwd_scale = 1.0 ):
1125
+ return rfftn (x , s = s , axes = axes , fsc = fwd_scale )
1126
1126
1127
1127
1128
- def irfft2_numpy (x , s = None , axes = (- 2 ,- 1 ), fwd_scale = 1.0 ):
1129
- return irfftn_numpy (x , s = s , axes = axes , fsc = fwd_scale )
1128
+ def irfft2 (x , s = None , axes = (- 2 ,- 1 ), fwd_scale = 1.0 ):
1129
+ return irfftn (x , s = s , axes = axes , fsc = fwd_scale )
1130
1130
1131
1131
1132
1132
def _remove_axis (s , axes , axis_to_remove ):
@@ -1181,16 +1181,15 @@ def _fix_dimensions(cnp.ndarray arr, object s, object axes):
1181
1181
return np .pad (arr , tuple (pad_widths ), 'constant' )
1182
1182
1183
1183
1184
- def rfftn_numpy (x , s = None , axes = None , fwd_scale = 1.0 ):
1184
+ def rfftn (x , s = None , axes = None , fwd_scale = 1.0 ):
1185
1185
a = np .asarray (x )
1186
1186
no_trim = (s is None ) and (axes is None )
1187
1187
s , axes = _cook_nd_args (a , s , axes )
1188
1188
la = axes [- 1 ]
1189
- # trim array, so that rfft_numpy avoids doing
1190
- # unnecessary computations
1189
+ # trim array, so that rfft avoids doing unnecessary computations
1191
1190
if not no_trim :
1192
1191
a = _trim_array (a , s , axes )
1193
- a = rfft_numpy (a , n = s [- 1 ], axis = la , fwd_scale = fwd_scale )
1192
+ a = rfft (a , n = s [- 1 ], axis = la , fwd_scale = fwd_scale )
1194
1193
if len (s ) > 1 :
1195
1194
if not no_trim :
1196
1195
ss = list (s )
@@ -1214,7 +1213,7 @@ def rfftn_numpy(x, s=None, axes=None, fwd_scale=1.0):
1214
1213
return a
1215
1214
1216
1215
1217
- def irfftn_numpy (x , s = None , axes = None , fwd_scale = 1.0 ):
1216
+ def irfftn (x , s = None , axes = None , fwd_scale = 1.0 ):
1218
1217
a = np .asarray (x )
1219
1218
no_trim = (s is None ) and (axes is None )
1220
1219
s , axes = _cook_nd_args (a , s , axes , invreal = True )
@@ -1243,5 +1242,5 @@ def irfftn_numpy(x, s=None, axes=None, fwd_scale=1.0):
1243
1242
for ii in range (len (axes )- 1 ):
1244
1243
a = ifft (a , s [ii ], axes [ii ], overwrite_x = ovr_x )
1245
1244
ovr_x = True
1246
- a = irfft_numpy (a , n = s [- 1 ], axis = la , fwd_scale = fwd_scale )
1245
+ a = irfft (a , n = s [- 1 ], axis = la , fwd_scale = fwd_scale )
1247
1246
return a
0 commit comments