Skip to content

Commit ce1d07f

Browse files
committed
RF: Make idx a positional argument.
You probably always pass an index when you are trying to get an item.
1 parent cb0ac6a commit ce1d07f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/spatialimages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ def from_image(klass, img):
656656
klass.header_class.from_header(img.header),
657657
extra=img.extra.copy())
658658

659-
def __getitem__(self, idx=None):
659+
def __getitem__(self, idx):
660660
''' No slicing or dictionary interface for images
661661
'''
662662
raise TypeError("Cannot slice image objects; consider slicing image "

0 commit comments

Comments
 (0)