summaryrefslogtreecommitdiff
path: root/numpy/lib/stride_tricks.py
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2021-07-12 13:03:28 +0300
committerGitHub <noreply@github.com>2021-07-12 13:03:28 +0300
commitc07080f12652b2cced2f6ca2cb3e72e085565047 (patch)
treea5649e9f79ecfaf1720ded4d576ac8221b5769b0 /numpy/lib/stride_tricks.py
parentbb71b5fb7b65b662c1fffa3f8120cbfd02e2c164 (diff)
parent2599a4c569dbdeb3cd2f3d6da3502886a4333fda (diff)
downloadnumpy-c07080f12652b2cced2f6ca2cb3e72e085565047.tar.gz
Merge pull request #19445 from timhoffm/doc-broadcast_to
DOC: broadcast_to() supports int as shape parameter
Diffstat (limited to 'numpy/lib/stride_tricks.py')
-rw-r--r--numpy/lib/stride_tricks.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/lib/stride_tricks.py b/numpy/lib/stride_tricks.py
index 82c8a57c8..5093993a9 100644
--- a/numpy/lib/stride_tricks.py
+++ b/numpy/lib/stride_tricks.py
@@ -371,8 +371,9 @@ def broadcast_to(array, shape, subok=False):
----------
array : array_like
The array to broadcast.
- shape : tuple
- The shape of the desired array.
+ shape : tuple or int
+ The shape of the desired array. A single integer ``i`` is interpreted
+ as ``(i,)``.
subok : bool, optional
If True, then sub-classes will be passed-through, otherwise
the returned array will be forced to be a base-class array (default).