summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Hallouin <thibault.hallouin@ucdconnect.ie>2018-09-24 09:36:51 +0100
committermattip <matti.picus@gmail.com>2018-10-10 12:27:49 +0300
commit9a82c53c8a2b9bd4798e515544de4a701cbfba3f (patch)
treec0fac9bda400c7dcc2f36eaf28dfa59963417ee3
parent86a7acc8582923604fac849bb19f0b08efc0a91a (diff)
downloadnumpy-9a82c53c8a2b9bd4798e515544de4a701cbfba3f.tar.gz
DOC: sychronize ufunc documentation, add broadcast note
-rw-r--r--numpy/core/_add_newdocs.py8
-rw-r--r--numpy/core/code_generators/ufunc_docstrings.py6
2 files changed, 8 insertions, 6 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index 1c82cfde4..3a05ad4bd 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -5655,10 +5655,10 @@ add_newdoc('numpy.core', 'ufunc',
number of outputs; use `None` for uninitialized outputs to be
allocated by the ufunc.
where : array_like, optional
- Values of True indicate to calculate the ufunc at that position, values
- of False indicate to leave the value in the output alone. Note that if
- an uninitialized return array is created via the default ``out=None``,
- then the elements where the values are False will remain uninitialized.
+ Broadcast over the input. If the value is True, output will be set
+ to the ufunc output; otherwise it is left unchanged. Note that if an
+ uninitialized return array is created via the default ``out=None``,
+ output where the values are False will remain uninitialized.
**kwargs
For other keyword-only arguments, see the :ref:`ufunc docs <ufuncs.kwargs>`.
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py
index 6e5cb25af..e7b3b3b4e 100644
--- a/numpy/core/code_generators/ufunc_docstrings.py
+++ b/numpy/core/code_generators/ufunc_docstrings.py
@@ -26,8 +26,10 @@ subst = {
a freshly-allocated array is returned. A tuple (possible only as a
keyword argument) must have length equal to the number of outputs.
where : array_like, optional
- Values of True indicate to calculate the ufunc at that position, values
- of False indicate to leave the value in the output alone.
+ Broadcast over the input. If the value is True, output will be set
+ to the ufunc output; otherwise it is left unchanged. Note that if an
+ uninitialized return array is created via the default ``out=None``,
+ output where the values are False will remain uninitialized.
**kwargs
For other keyword-only arguments, see the
:ref:`ufunc docs <ufuncs.kwargs>`.