remove redundant `_swap_direction`
@@ -7,7 +7,8 @@ import cupy
from cupy.cuda import cufft
from cupy.fft._fft import (_fft, _default_fft_func, hfft as _hfft,
- ihfft as _ihfft, _size_last_transform_axis)
+ ihfft as _ihfft, _size_last_transform_axis,
+ _swap_direction)
from cupy.fft import fftshift, ifftshift, fftfreq, rfftfreq
from cupyx.scipy.fftpack import get_fft_plan
@@ -573,17 +574,6 @@ def ihfft(x, n=None, axis=-1, norm=None, overwrite_x=False, *, plan=None):
return _ihfft(x, n, axis, norm)
-def _swap_direction(norm):
- if norm in (None, 'backward'):
- norm = 'forward'
- elif norm == 'forward':
- norm = 'backward'
- elif norm != 'ortho':
- raise ValueError('Invalid norm value %s; should be "backward", '
- '"ortho", or "forward".' % norm)
- return norm
-
-
@_implements(_scipy_fft.hfft2)
def hfft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False, *,
plan=None):
