|
76 | 76 | import numpy as np |
77 | 77 |
|
78 | 78 | from . import _pydfti as mkl_fft # pylint: disable=no-name-in-module |
79 | | -from ._fft_utils import _check_norm, _compute_fwd_scale |
| 79 | +from ._fft_utils import check_norm, compute_fwd_scale |
80 | 80 | from ._float_utils import __downcast_float128_array |
81 | 81 |
|
82 | 82 |
|
@@ -125,7 +125,7 @@ def _cook_nd_args(a, s=None, axes=None, invreal=False): |
125 | 125 |
|
126 | 126 |
|
127 | 127 | def _swap_direction(norm): |
128 | | - _check_norm(norm) |
| 128 | + check_norm(norm) |
129 | 129 | _swap_direction_map = { |
130 | 130 | "backward": "forward", |
131 | 131 | None: "forward", |
@@ -241,7 +241,7 @@ def fft(a, n=None, axis=-1, norm=None): |
241 | 241 | """ |
242 | 242 |
|
243 | 243 | x = __downcast_float128_array(a) |
244 | | - fsc = _compute_fwd_scale(norm, n, x.shape[axis]) |
| 244 | + fsc = compute_fwd_scale(norm, n, x.shape[axis]) |
245 | 245 |
|
246 | 246 | return trycall(mkl_fft.fft, (x,), {"n": n, "axis": axis, "fwd_scale": fsc}) |
247 | 247 |
|
@@ -334,7 +334,7 @@ def ifft(a, n=None, axis=-1, norm=None): |
334 | 334 | """ |
335 | 335 |
|
336 | 336 | x = __downcast_float128_array(a) |
337 | | - fsc = _compute_fwd_scale(norm, n, x.shape[axis]) |
| 337 | + fsc = compute_fwd_scale(norm, n, x.shape[axis]) |
338 | 338 |
|
339 | 339 | return trycall(mkl_fft.ifft, (x,), {"n": n, "axis": axis, "fwd_scale": fsc}) |
340 | 340 |
|
@@ -425,7 +425,7 @@ def rfft(a, n=None, axis=-1, norm=None): |
425 | 425 | """ |
426 | 426 |
|
427 | 427 | x = __downcast_float128_array(a) |
428 | | - fsc = _compute_fwd_scale(norm, n, x.shape[axis]) |
| 428 | + fsc = compute_fwd_scale(norm, n, x.shape[axis]) |
429 | 429 |
|
430 | 430 | return trycall(mkl_fft.rfft, (x,), {"n": n, "axis": axis, "fwd_scale": fsc}) |
431 | 431 |
|
@@ -518,7 +518,7 @@ def irfft(a, n=None, axis=-1, norm=None): |
518 | 518 | """ |
519 | 519 |
|
520 | 520 | x = __downcast_float128_array(a) |
521 | | - fsc = _compute_fwd_scale(norm, n, 2 * (x.shape[axis] - 1)) |
| 521 | + fsc = compute_fwd_scale(norm, n, 2 * (x.shape[axis] - 1)) |
522 | 522 |
|
523 | 523 | return trycall( |
524 | 524 | mkl_fft.irfft, (x,), {"n": n, "axis": axis, "fwd_scale": fsc} |
@@ -606,7 +606,7 @@ def hfft(a, n=None, axis=-1, norm=None): |
606 | 606 | x = __downcast_float128_array(a) |
607 | 607 | x = np.array(x, copy=True, dtype=complex) |
608 | 608 | np.conjugate(x, out=x) |
609 | | - fsc = _compute_fwd_scale(norm, n, 2 * (x.shape[axis] - 1)) |
| 609 | + fsc = compute_fwd_scale(norm, n, 2 * (x.shape[axis] - 1)) |
610 | 610 |
|
611 | 611 | return trycall( |
612 | 612 | mkl_fft.irfft, (x,), {"n": n, "axis": axis, "fwd_scale": fsc} |
@@ -675,7 +675,7 @@ def ihfft(a, n=None, axis=-1, norm=None): |
675 | 675 | norm = _swap_direction(norm) |
676 | 676 | x = __downcast_float128_array(a) |
677 | 677 | x = np.array(x, copy=True, dtype=float) |
678 | | - fsc = _compute_fwd_scale(norm, n, x.shape[axis]) |
| 678 | + fsc = compute_fwd_scale(norm, n, x.shape[axis]) |
679 | 679 |
|
680 | 680 | output = trycall( |
681 | 681 | mkl_fft.rfft, (x,), {"n": n, "axis": axis, "fwd_scale": fsc} |
@@ -787,7 +787,7 @@ def fftn(a, s=None, axes=None, norm=None): |
787 | 787 |
|
788 | 788 | x = __downcast_float128_array(a) |
789 | 789 | s, axes = _cook_nd_args(x, s, axes) |
790 | | - fsc = _compute_fwd_scale(norm, s, x.shape) |
| 790 | + fsc = compute_fwd_scale(norm, s, x.shape) |
791 | 791 |
|
792 | 792 | return trycall(mkl_fft.fftn, (x,), {"s": s, "axes": axes, "fwd_scale": fsc}) |
793 | 793 |
|
@@ -894,7 +894,7 @@ def ifftn(a, s=None, axes=None, norm=None): |
894 | 894 |
|
895 | 895 | x = __downcast_float128_array(a) |
896 | 896 | s, axes = _cook_nd_args(x, s, axes) |
897 | | - fsc = _compute_fwd_scale(norm, s, x.shape) |
| 897 | + fsc = compute_fwd_scale(norm, s, x.shape) |
898 | 898 |
|
899 | 899 | return trycall( |
900 | 900 | mkl_fft.ifftn, (x,), {"s": s, "axes": axes, "fwd_scale": fsc} |
@@ -1182,7 +1182,7 @@ def rfftn(a, s=None, axes=None, norm=None): |
1182 | 1182 |
|
1183 | 1183 | x = __downcast_float128_array(a) |
1184 | 1184 | s, axes = _cook_nd_args(x, s, axes) |
1185 | | - fsc = _compute_fwd_scale(norm, s, x.shape) |
| 1185 | + fsc = compute_fwd_scale(norm, s, x.shape) |
1186 | 1186 |
|
1187 | 1187 | return trycall( |
1188 | 1188 | mkl_fft.rfftn, (x,), {"s": s, "axes": axes, "fwd_scale": fsc} |
@@ -1326,7 +1326,7 @@ def irfftn(a, s=None, axes=None, norm=None): |
1326 | 1326 |
|
1327 | 1327 | x = __downcast_float128_array(a) |
1328 | 1328 | s, axes = _cook_nd_args(x, s, axes, invreal=True) |
1329 | | - fsc = _compute_fwd_scale(norm, s, x.shape) |
| 1329 | + fsc = compute_fwd_scale(norm, s, x.shape) |
1330 | 1330 |
|
1331 | 1331 | return trycall( |
1332 | 1332 | mkl_fft.irfftn, (x,), {"s": s, "axes": axes, "fwd_scale": fsc} |
|
0 commit comments