Skip to content

Commit

Permalink
[vecarray.numpy] fix a 3to2 conversion
Browse files Browse the repository at this point in the history
closes #301
  • Loading branch information
renefritze committed Jan 6, 2017
1 parent a45b5cd commit 17925ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pymor/vectorarrays/interfaces.py
Expand Up @@ -447,8 +447,8 @@ def sub_index(self, ind, ind_ind):
if type(ind) is slice:
ind = range(*ind.indices(len(self)))
if type(ind_ind) is slice:
if config.PY2: # Currently we do not convert range to xrange, so ind is a list
return ind[ind_ind]
if config.PY2: # make ind a list since is xrange is not sliceable
return list(ind)[ind_ind]
else:
result = ind[ind_ind]
return slice(result.start, result.stop, result.step)
Expand Down

0 comments on commit 17925ed

Please sign in to comment.