Skip to content

Commit caf1298

Browse files
committed
FIX: CoordinateAxis.__getitem__ fix
1 parent 289175e commit caf1298

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

nibabel/coordimage.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def __getitem__(self, slicer):
3939
return self
4040
elif isinstance(slicer, slice):
4141
slicer = fill_slicer(slicer, len(self))
42-
print(slicer)
4342
start, stop, step = slicer.start, slicer.stop, slicer.step
4443
else:
4544
raise TypeError(f"Indexing type not supported: {type(slicer)}")
@@ -48,7 +47,6 @@ def __getitem__(self, slicer):
4847
pstop = 0
4948
for parcel in self.parcels:
5049
pstart, pstop = pstop, pstop + len(parcel)
51-
print(pstart, pstop)
5250
if pstop < start:
5351
continue
5452
if pstart >= stop:
@@ -57,8 +55,7 @@ def __getitem__(self, slicer):
5755
substart = (start - pstart) % step
5856
else:
5957
substart = start - pstart
60-
print(slice(substart, stop - pstart, step))
61-
subparcels.append(parcel[substart:stop - pstop:step])
58+
subparcels.append(parcel[substart:stop - pstart:step])
6259
return CoordinateAxis(subparcels)
6360

6461
def get_indices(self, parcel, indices=None):

0 commit comments

Comments
 (0)