mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-01 08:36:49 +08:00
FIX: Specify field index for Python 2.6 compatible use of str.format()
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user