DOC: fix numpy dtype print out.

This fix may be very dependent on numpy version since print out has change over time.
This commit is contained in:
Tony S Yu
2012-09-11 23:47:18 -04:00
parent ae429011cf
commit 538ce329a5
2 changed files with 8 additions and 8 deletions
+6 -6
View File
@@ -57,7 +57,7 @@ def erosion(image, selem, out=None, shift_x=False, shift_y=False):
[0, 0, 0, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]], dtype='uint8')
[0, 0, 0, 0, 0]], dtype=uint8)
"""
@@ -109,7 +109,7 @@ def dilation(image, selem, out=None, shift_x=False, shift_y=False):
[0, 1, 1, 1, 0],
[0, 1, 1, 1, 0],
[0, 1, 1, 1, 0],
[0, 0, 0, 0, 0]], dtype='uint8')
[0, 0, 0, 0, 0]], dtype=uint8)
"""
@@ -158,7 +158,7 @@ def opening(image, selem, out=None):
[1, 1, 0, 1, 1],
[1, 1, 0, 1, 1],
[1, 1, 0, 1, 1],
[0, 0, 0, 0, 0]], dtype='uint8')
[0, 0, 0, 0, 0]], dtype=uint8)
"""
@@ -208,7 +208,7 @@ def closing(image, selem, out=None):
[0, 0, 0, 0, 0],
[1, 1, 1, 1, 1],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]], dtype='uint8')
[0, 0, 0, 0, 0]], dtype=uint8)
"""
@@ -257,7 +257,7 @@ def white_tophat(image, selem, out=None):
[0, 0, 1, 0, 0],
[0, 1, 5, 1, 0],
[0, 0, 1, 0, 0],
[0, 0, 0, 0, 0]], dtype='uint8')
[0, 0, 0, 0, 0]], dtype=uint8)
"""
if image is out:
@@ -306,7 +306,7 @@ def black_tophat(image, selem, out=None):
[0, 0, 1, 0, 0],
[0, 1, 5, 1, 0],
[0, 0, 1, 0, 0],
[0, 0, 0, 0, 0]], dtype='uint8')
[0, 0, 0, 0, 0]], dtype=uint8)
"""
+2 -2
View File
@@ -261,7 +261,7 @@ def is_local_maximum(image, labels=None, footprint=None):
array([[ True, False, False, False],
[ True, False, True, False],
[ True, False, False, False],
[ True, True, False, True]], dtype='bool')
[ True, True, False, True]], dtype=bool)
>>> image = np.arange(16).reshape((4, 4))
>>> labels = np.array([[1, 2], [3, 4]])
>>> labels = np.repeat(np.repeat(labels, 2, axis=0), 2, axis=1)
@@ -279,7 +279,7 @@ def is_local_maximum(image, labels=None, footprint=None):
array([[False, False, False, False],
[False, True, False, True],
[False, False, False, False],
[False, True, False, True]], dtype='bool')
[False, True, False, True]], dtype=bool)
"""
if labels is None:
labels = np.ones(image.shape, dtype=np.uint8)