Commit 5eda768c authored by Gilles Guitton's avatar Gilles Guitton

- preserve indices in Slices objects returned by Slices outsub_insub_slices() method.

parent 00651db2
......@@ -612,7 +612,11 @@ class Slices(tuple):
assert inmin >= 0 and inmin < subsize and \
inmax >= 0 and inmax < subsize
# Make slices
if absstep > 0:
if self._is_index[i]:
assert outmin == outmax and inmin == inmax
outsub_slices.append(outmin)
insub_slices.append(inmin)
elif absstep > 0:
outsub_slices.append(slice(outmin, outmax+1, 1))
insub_slices.append(slice(inmin, inmax+1, absstep))
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment