From 8cba840a057b6379c8def32ff57484af62855b75 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Wed, 11 Jun 2014 20:28:54 +1000 Subject: [PATCH 1/2] Clarify `mask` argument in `medial_axis` docstring --- skimage/morphology/_skeletonize.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/skimage/morphology/_skeletonize.py b/skimage/morphology/_skeletonize.py index ddc62008..edb250ff 100644 --- a/skimage/morphology/_skeletonize.py +++ b/skimage/morphology/_skeletonize.py @@ -164,11 +164,11 @@ def medial_axis(image, mask=None, return_distance=False): Parameters ---------- - image : binary ndarray + image : binary ndarray, shape (M, N) - mask : binary ndarray, optional - If a mask is given, only those elements with a true value in `mask` - are used for computing the medial axis. + mask : binary ndarray, shape (M, N), optional + If a mask is given, only those elements in `image` with a true + value in `mask` are used for computing the medial axis. return_distance : bool, optional If true, the distance transform is returned as well as the skeleton. @@ -179,7 +179,7 @@ def medial_axis(image, mask=None, return_distance=False): out : ndarray of bools Medial axis transform of the image - dist : ndarray of ints + dist : ndarray of ints, optional Distance transform of the image (only returned if `return_distance` is True) From 34cf1f9243da3d5efe9bd2a0435da2fcf0e4fa65 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Thu, 12 Jun 2014 01:20:53 +1000 Subject: [PATCH 2/2] Update parameter list in docstring for consistency --- skimage/morphology/_skeletonize.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/skimage/morphology/_skeletonize.py b/skimage/morphology/_skeletonize.py index edb250ff..d310bad3 100644 --- a/skimage/morphology/_skeletonize.py +++ b/skimage/morphology/_skeletonize.py @@ -163,22 +163,18 @@ def medial_axis(image, mask=None, return_distance=False): Parameters ---------- - image : binary ndarray, shape (M, N) - + The image of the shape to be skeletonized. mask : binary ndarray, shape (M, N), optional If a mask is given, only those elements in `image` with a true value in `mask` are used for computing the medial axis. - return_distance : bool, optional If true, the distance transform is returned as well as the skeleton. Returns ------- - out : ndarray of bools Medial axis transform of the image - dist : ndarray of ints, optional Distance transform of the image (only returned if `return_distance` is True)