Skip to content

Commit

Permalink
Fix uses of xrange
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Mar 16, 2016
1 parent f735aec commit ffaac0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycuda/gpuarray.py
Expand Up @@ -1103,7 +1103,7 @@ def _compact_strides(a):
# Compute strides to have same order as self, but packed
info = sorted(
(a.strides[axis], a.shape[axis], axis)
for axis in xrange(len(a.shape)))
for axis in range(len(a.shape)))

strides = [None]*len(a.shape)
stride = a.dtype.itemsize
Expand Down Expand Up @@ -1143,7 +1143,7 @@ def _memcpy_discontig(dst, src, async=False, stream=None):
# and remove singleton axes
src_info = sorted(
(src.strides[axis], axis)
for axis in xrange(len(src.shape)) if src.shape[axis] > 1)
for axis in range(len(src.shape)) if src.shape[axis] > 1)
axes = [axis for _, axis in src_info]
shape = [src.shape[axis] for axis in axes]
src_strides = [src.strides[axis] for axis in axes]
Expand Down

0 comments on commit ffaac0c

Please sign in to comment.