Fix some doctest warnings

Fix doctest errors

Suppress warnings when importing scipy.ndimage for the first time
This commit is contained in:
Steven Silvester
2014-12-23 16:49:01 -06:00
parent 2756358f3c
commit 542cd4fabe
5 changed files with 14 additions and 9 deletions
+3 -3
View File
@@ -119,9 +119,9 @@ def watershed(image, markers, connectivity=None, offset=None, mask=None):
>>> from skimage.feature import peak_local_max
>>> local_maxi = peak_local_max(distance, labels=image,
... footprint=np.ones((3, 3)),
... indices=False)
>>> markers = ndimage.label(local_maxi)[0]
>>> labels = watershed(-distance, markers, mask=image)
... indices=False) # doctest: +SKIP
>>> markers = ndimage.label(local_maxi)[0] # doctest: +SKIP
>>> labels = watershed(-distance, markers, mask=image) # doctest: +SKIP
The algorithm works also for 3-D images, and can be used for example to
separate overlapping spheres.