Skip to content

Commit cd0f6fa

Browse files
committed
Clarify dtype when behavior='rank'
1 parent c266a39 commit cd0f6fa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/skimage/filters/_median.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ def median(
2121
with the same number of dimensions as `image`.
2222
If None, `footprint` will be a N-D array with 3 elements for each
2323
dimension (e.g., vector, square, cube, etc.).
24-
out : ndarray, same dtype as input `image`, optional
25-
If None, a new array is allocated.
24+
out : ndarray, optional
25+
If None, a new array is allocated. For ``behavior='ndimage'``,
26+
dtype matches input. For ``behavior='rank'``, dtype follows
27+
:func:`skimage.filters.rank.median`.
2628
mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
2729
The mode parameter determines how the array borders are handled, where
2830
`cval` is the value when `mode` is equal to 'constant'.
@@ -49,8 +51,9 @@ def median(
4951
5052
Returns
5153
-------
52-
out : ndarray, same dtype as input `image`
53-
Output image.
54+
out : ndarray
55+
Output image. For ``behavior='ndimage'``, dtype matches input. For
56+
``behavior='rank'``, dtype follows :func:`skimage.filters.rank.median`.
5457
5558
See also
5659
--------

0 commit comments

Comments
 (0)