Merge pull request #823 from JDWarner/novice_py26_compatible

FIX: Specify field index for Python 2.6 compatible use of str.format()
This commit is contained in:
Stefan van der Walt
2013-11-21 01:44:35 -08:00
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()