mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-20 12:40:31 +08:00
Fix regionprops doctest
This commit is contained in:
@@ -485,7 +485,9 @@ def regionprops(label_image, properties=None,
|
||||
>>> 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)
|
||||
@@ -505,7 +507,7 @@ def regionprops(label_image, properties=None,
|
||||
for i, sl in enumerate(objects):
|
||||
if sl is None:
|
||||
continue
|
||||
|
||||
|
||||
label = i + 1
|
||||
|
||||
props = _RegionProperties(sl, label, label_image,
|
||||
|
||||
Reference in New Issue
Block a user