summaryrefslogtreecommitdiff
path: root/numpy/lib/arraypad.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/arraypad.py')
-rw-r--r--numpy/lib/arraypad.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py
index 82f741df9..bbfdce794 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']
@@ -243,7 +244,6 @@ def _prepend_ramp(arr, pad_amt, end, axis=-1):
ramp_arr = _arange_ndarray(arr, padshape, axis,
reverse=True).astype(np.float64)
-
# Appropriate slicing to extract n-dimensional edge along `axis`
edge_slice = tuple(slice(None) if i != axis else 0
for (i, x) in enumerate(arr.shape))
@@ -1419,7 +1419,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 +1442,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 +1460,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 +1470,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