summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-12-14 08:22:31 +0200
committerWarren Weckesser <warren.weckesser@gmail.com>2019-12-14 01:22:31 -0500
commit2fc10a279edfd132ec27eeac9e72f5a02a8bae5e (patch)
tree8f2109e0d83027cbf9607fb40ecf0456b609c80c /numpy
parent578f4e7dca4701637284c782d8c74c0d5b688341 (diff)
downloadnumpy-2fc10a279edfd132ec27eeac9e72f5a02a8bae5e.tar.gz
DOC: bring the out parameter docstring into line with ufuncs (#15097)
Diffstat (limited to 'numpy')
-rw-r--r--numpy/lib/ufunclike.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/numpy/lib/ufunclike.py b/numpy/lib/ufunclike.py
index 96fd5b319..9f03b1329 100644
--- a/numpy/lib/ufunclike.py
+++ b/numpy/lib/ufunclike.py
@@ -85,13 +85,20 @@ def fix(x, out=None):
----------
x : array_like
An array of floats to be rounded
- y : ndarray, optional
- Output array
+ out : ndarray, optional
+ A location into which the result is stored. If provided, it must have
+ a shape that the input broadcasts to. If not provided or None, a
+ freshly-allocated array is returned.
Returns
-------
out : ndarray of floats
- The array of rounded numbers
+ A float array with the same dimensions as the input.
+ If second argument is not supplied then a float array is returned
+ with the rounded values.
+
+ If a second argument is supplied the result is stored there.
+ The return value `out` is then a reference to that array.
See Also
--------
@@ -129,8 +136,10 @@ def isposinf(x, out=None):
----------
x : array_like
The input array.
- y : array_like, optional
- A boolean array with the same shape as `x` to store the result.
+ out : array_like, optional
+ A location into which the result is stored. If provided, it must have a
+ shape that the input broadcasts to. If not provided or None, a
+ freshly-allocated boolean array is returned.
Returns
-------
@@ -199,8 +208,9 @@ def isneginf(x, out=None):
x : array_like
The input array.
out : array_like, optional
- A boolean array with the same shape and type as `x` to store the
- result.
+ A location into which the result is stored. If provided, it must have a
+ shape that the input broadcasts to. If not provided or None, a
+ freshly-allocated boolean array is returned.
Returns
-------