mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-09 12:30:07 +08:00
Updated docstrings
This commit is contained in:
@@ -14,7 +14,9 @@ skimage2ndimage.update({x: x for x in funcs})
|
||||
|
||||
def default_fallback(func):
|
||||
"""Decorator to fall back on ndimage for images with more than 2 dimensions
|
||||
|
||||
Decorator also provides a default structuring element, `selem`, with the
|
||||
appropriate dimensionality if none is specified.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
func : function
|
||||
@@ -29,26 +31,6 @@ def default_fallback(func):
|
||||
"""
|
||||
|
||||
def func_out(image, selem=None, out=None, **kwargs):
|
||||
"""Select a function appropriate for the image dimensionality
|
||||
|
||||
Parameters
|
||||
----------
|
||||
image : ndarray
|
||||
Image array.
|
||||
selem : ndarray, optional
|
||||
The neighborhood expressed as a 2-D array of 1's and 0's.
|
||||
If None, use cross-shaped structuring element (connectivity=1).
|
||||
out : ndarray of bool, optional
|
||||
The array to store the result of the morphology. If None is
|
||||
passed, a new array will be allocated.
|
||||
|
||||
Returns
|
||||
-------
|
||||
func_out : function
|
||||
If the image dimentionality is greater than 2D, the ndimage
|
||||
function is returned, otherwise skimage function is used.
|
||||
"""
|
||||
|
||||
# Default structure element
|
||||
if selem is None:
|
||||
selem = _default_selem(image.ndim)
|
||||
|
||||
Reference in New Issue
Block a user