From dec6658cdc10a23ad0e733fb52a814306033d88c Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 30 Jul 2014 16:48:11 -0600 Subject: MAINT: Fixes for problems in numpy/lib revealed by pyflakes. Some of those problems look like potential coding errors. In those cases a Fixme comment was made and the offending code, usually an unused variable, was commented out. --- numpy/lib/arraypad.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'numpy/lib/arraypad.py') diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py index 82f741df9..befa9839e 100644 --- a/numpy/lib/arraypad.py +++ b/numpy/lib/arraypad.py @@ -8,6 +8,7 @@ from __future__ import division, absolute_import, print_function import numpy as np from numpy.compat import long + __all__ = ['pad'] @@ -1419,7 +1420,6 @@ def pad(array, pad_width, mode=None, **kwargs): method = kwargs['reflect_type'] safe_pad = newmat.shape[axis] - 1 - repeat = safe_pad while ((pad_before > safe_pad) or (pad_after > safe_pad)): offset = 0 pad_iter_b = min(safe_pad, @@ -1443,7 +1443,6 @@ def pad(array, pad_width, mode=None, **kwargs): # length, to keep the period of the reflections consistent. method = kwargs['reflect_type'] safe_pad = newmat.shape[axis] - repeat = safe_pad while ((pad_before > safe_pad) or (pad_after > safe_pad)): pad_iter_b = min(safe_pad, @@ -1462,7 +1461,6 @@ def pad(array, pad_width, mode=None, **kwargs): # for indexing tricks. We can only safely pad the original axis # length, to keep the period of the reflections consistent. safe_pad = newmat.shape[axis] - repeat = safe_pad while ((pad_before > safe_pad) or (pad_after > safe_pad)): pad_iter_b = min(safe_pad, @@ -1473,7 +1471,6 @@ def pad(array, pad_width, mode=None, **kwargs): pad_before -= pad_iter_b pad_after -= pad_iter_a safe_pad += pad_iter_b + pad_iter_a - newmat = _pad_wrap(newmat, (pad_before, pad_after), axis) return newmat -- cgit v1.2.1