Skip to content

Commit

Permalink
DOC: Improve documentation of the out argument (numpy#25431)
Browse files Browse the repository at this point in the history
* DOC: Improve documentation of`mean`/`std`/`nanmean` `out` arguments
  • Loading branch information
pieleric authored Feb 3, 2024
1 parent 4cba441 commit 5c34c87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions numpy/_core/fromnumeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -3505,6 +3505,7 @@ def mean(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, *,
is ``None``; if provided, it must have the same shape as the
expected output, but the type will be cast if necessary.
See :ref:`ufuncs-output-type` for more details.
See :ref:`ufuncs-output-type` for more details.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
Expand Down Expand Up @@ -3631,6 +3632,7 @@ def std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue, *,
Alternative output array in which to place the result. It must have
the same shape as the expected output but the type (of the calculated
values) will be cast if necessary.
See :ref:`ufuncs-output-type` for more details.
ddof : {int, float}, optional
Means Delta Degrees of Freedom. The divisor used in calculations
is ``N - ddof``, where ``N`` represents the number of elements.
Expand Down
4 changes: 2 additions & 2 deletions numpy/lib/_nanfunctions_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,8 @@ def nanmean(a, axis=None, dtype=None, out=None, keepdims=np._NoValue,
out : ndarray, optional
Alternate output array in which to place the result. The default
is ``None``; if provided, it must have the same shape as the
expected output, but the type will be cast if necessary. See
:ref:`ufuncs-output-type` for more details.
expected output, but the type will be cast if necessary.
See :ref:`ufuncs-output-type` for more details.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
in the result as dimensions with size one. With this option,
Expand Down

0 comments on commit 5c34c87

Please sign in to comment.