diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-12-14 08:22:31 +0200 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2019-12-14 01:22:31 -0500 |
commit | 2fc10a279edfd132ec27eeac9e72f5a02a8bae5e (patch) | |
tree | 8f2109e0d83027cbf9607fb40ecf0456b609c80c | |
parent | 578f4e7dca4701637284c782d8c74c0d5b688341 (diff) | |
download | numpy-2fc10a279edfd132ec27eeac9e72f5a02a8bae5e.tar.gz |
DOC: bring the out parameter docstring into line with ufuncs (#15097)
-rw-r--r-- | numpy/lib/ufunclike.py | 24 |
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 ------- |