This line triggers a bug on Python 2.6. See also nisl/image.py:104. 

Use `hasattr(niimg, "__iter__")` instead.