Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions numpy/lib/_function_base_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3948,11 +3948,10 @@ def median(a, axis=None, out=None, overwrite_input=False, keepdims=False):
Returns
-------
median : ndarray
A new array holding the result. If the input contains integers
or floats smaller than ``float64``, then the output data-type is
``np.float64``. Otherwise, the data-type of the output is the
same as that of the input. If `out` is specified, that array is
returned instead.
A new array holding the result. Return data-type is "float64"
for integer input. For floating-point input, the return data-type
is the same as the input data-type. If `out` is specified, that
array is returned instead.

See Also
--------
Expand Down
5 changes: 3 additions & 2 deletions numpy/ma/extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,9 @@ def median(a, axis=None, out=None, overwrite_input=False, keepdims=False):
median : ndarray
A new array holding the result is returned unless out is
specified, in which case a reference to out is returned.
Return data-type is `float64` for integers and floats smaller than
`float64`, or the input data-type, otherwise.
Return data-type is "float64" for integer input. For
floating-point input, the return data-type is the same as
the input data-type.

See Also
--------
Expand Down