diff options
author | Ross Barnowski <rossbar@berkeley.edu> | 2020-02-22 20:26:11 -0800 |
---|---|---|
committer | Ross Barnowski <rossbar@berkeley.edu> | 2020-02-22 20:26:11 -0800 |
commit | d6ddc686348da34eb429e5f2423806eae6ad443b (patch) | |
tree | c2d9c577daf4f80809d90f2dbc3230659ae578de | |
parent | 9b1acd42e8d4cfd476dc97b8d5bfe12b0c229d9d (diff) | |
download | numpy-d6ddc686348da34eb429e5f2423806eae6ad443b.tar.gz |
MAINT: Pull identical line out of conditional.
There was an identical statement in both possible branches of
a conditional.
Moved statement out of conditional to eliminate one
repititious LOC
-rw-r--r-- | numpy/fft/_pocketfft.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/fft/_pocketfft.py b/numpy/fft/_pocketfft.py index f2510a6c2..3eab242e5 100644 --- a/numpy/fft/_pocketfft.py +++ b/numpy/fft/_pocketfft.py @@ -59,12 +59,11 @@ def _raw_fft(a, n, axis, is_real, is_forward, inv_norm): if a.shape[axis] != n: s = list(a.shape) + index = [slice(None)]*len(s) if s[axis] > n: - index = [slice(None)]*len(s) index[axis] = slice(0, n) a = a[tuple(index)] else: - index = [slice(None)]*len(s) index[axis] = slice(0, s[axis]) s[axis] = n z = zeros(s, a.dtype.char) |