summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStephan Hoyer <shoyer@climate.com>2015-01-14 23:41:30 -0800
committerStephan Hoyer <shoyer@climate.com>2015-02-26 18:15:44 -0800
commit05b5335ecf25e59477956b4f85b9a8edbdf71bcc (patch)
tree9f336ce41f3992cb955dbd5d0412015c9134c5c9 /doc
parent2e016ac65aceab4e08217794d6be7b365793976a (diff)
downloadnumpy-05b5335ecf25e59477956b4f85b9a8edbdf71bcc.tar.gz
ENH: add broadcast_to function
Per the mailing list discussion [1], I have implemented a new function `broadcast_to` that broadcasts an array to a given shape according to numpy's broadcasting rules. [1] http://mail.scipy.org/pipermail/numpy-discussion/2014-December/071796.html
Diffstat (limited to 'doc')
-rw-r--r--doc/release/1.10.0-notes.rst6
-rw-r--r--doc/source/reference/routines.array-manipulation.rst1
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst
index f9d202ec3..a07dca80f 100644
--- a/doc/release/1.10.0-notes.rst
+++ b/doc/release/1.10.0-notes.rst
@@ -94,6 +94,12 @@ number of rows read in a single call. Using this functionality, it is
possible to read in multiple arrays stored in a single file by making
repeated calls to the function.
+New function *np.broadcast_to* for invoking array broadcasting
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*np.broadcast_to* manually broadcasts an array to a given shape according to
+numpy's broadcasting rules. The functionality is similar to broadcast_arrays,
+which in fact has been rewritten to use broadcast_to internally, but only a
+single array is necessary.
Improvements
============
diff --git a/doc/source/reference/routines.array-manipulation.rst b/doc/source/reference/routines.array-manipulation.rst
index 81af0a315..2b3ba342a 100644
--- a/doc/source/reference/routines.array-manipulation.rst
+++ b/doc/source/reference/routines.array-manipulation.rst
@@ -40,6 +40,7 @@ Changing number of dimensions
atleast_2d
atleast_3d
broadcast
+ broadcast_to
broadcast_arrays
expand_dims
squeeze