Fix data type issue in python 3

This commit is contained in:
Johannes Schönberger
2013-11-04 00:31:07 +01:00
parent aaf0749b89
commit 863e89ba41
+3 -2
View File
@@ -479,15 +479,16 @@ def regionprops(label_image, properties=None,
Examples
--------
>>> from skimage.data import coins
>>> from skimage import data, util
>>> from skimage.morphology import label
>>> img = coins() > 110
>>> img = util.img_as_ubyte(data.coins()) > 110
>>> label_img = label(img)
>>> props = regionprops(label_img)
>>> props[0].centroid # centroid of first labelled object
(22.729879860483141, 81.912285234465827)
>>> props[0]['centroid'] # centroid of first labelled object
(22.729879860483141, 81.912285234465827)
"""
label_image = np.squeeze(label_image)