diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/fromnumeric.py | 4 | ||||
-rw-r--r-- | numpy/fft/_pocketfft.py | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index ab45ddfe8..acd2d2bea 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2039,8 +2039,8 @@ def clip(a, a_min, a_max, out=None, **kwargs): is specified, values smaller than 0 become 0, and values larger than 1 become 1. - Equivalent to but faster than ``np.maximum(a_min, np.minimum(a, a_max))`` - assuming ``a_min < a_max``. + Equivalent to but faster than ``np.minimum(a_max, np.maximum(a, a_min))``. + No check is performed to ensure ``a_min < a_max``. Parameters 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) |