FIX: Specify field index for Python 2.6 compatible use of str.format()

This commit is contained in:
JDWarner
2013-11-20 15:45:54 -06:00
parent 9d6eee4822
commit 98ff6e5f20
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ def open(path):
def _verify_picture_index(index):
"""Raise error if picture index is not a 2D index/slice."""
if not (isinstance(index, tuple) and len(index) == 2):
raise IndexError("Expected 2D index but got {!r}".format(index))
raise IndexError("Expected 2D index but got {0!r}".format(index))
if all(isinstance(i, int) for i in index):
return index
+1 -2
View File
@@ -268,5 +268,4 @@ def test_pixel_blue_raises():
if __name__ == '__main__':
from numpy import testing
testing.run_module_suite()
np.testing.run_module_suite()