diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-03-28 07:10:01 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-03-28 07:10:01 -0700 |
commit | 40742184df68fc01f3392c9865f35d5402e74b01 (patch) | |
tree | 4d4832417a28e128ed989fc273d322a551d1cfdb /numpy/ma/extras.py | |
parent | db75eb44a31fe1bb04a0f673fd459614bfd02b85 (diff) | |
parent | b995d00e2e54bc6ff97f21bd179d1fc4dc3c92cb (diff) | |
download | numpy-40742184df68fc01f3392c9865f35d5402e74b01.tar.gz |
Merge pull request #3122 from charris/2to3-apply-xrange-fixer
2to3: Replace xrange by range and use list(range(...)) where needed
Diffstat (limited to 'numpy/ma/extras.py')
-rw-r--r-- | numpy/ma/extras.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py index 857d72249..77d2dbb36 100644 --- a/numpy/ma/extras.py +++ b/numpy/ma/extras.py @@ -337,7 +337,7 @@ def apply_along_axis(func1d, axis, arr, *args, **kwargs): % (axis, nd)) ind = [0] * (nd - 1) i = np.zeros(nd, 'O') - indlist = range(nd) + indlist = list(range(nd)) indlist.remove(axis) i[axis] = slice(None, None) outshape = np.asarray(arr.shape).take(indlist) @@ -729,7 +729,7 @@ def compress_rowcols(x, axis=None): if m.all(): return nxarray([]) # Builds a list of rows/columns indices - (idxr, idxc) = (range(len(x)), range(x.shape[1])) + (idxr, idxc) = (list(range(len(x))), list(range(x.shape[1]))) masked = m.nonzero() if not axis: for i in np.unique(masked[0]): |