summaryrefslogtreecommitdiff
path: root/numpy/lib/stride_tricks.py
diff options
context:
space:
mode:
authorTim Hoffmann <2836374+timhoffm@users.noreply.github.com>2021-07-09 21:36:27 +0200
committerTim Hoffmann <2836374+timhoffm@users.noreply.github.com>2021-07-09 21:36:27 +0200
commit2599a4c569dbdeb3cd2f3d6da3502886a4333fda (patch)
tree25c34bf59de6147bb2073c7445815cb85613e503 /numpy/lib/stride_tricks.py
parentdf9c973f28fb9c0e713db29285b07b57c622652a (diff)
downloadnumpy-2599a4c569dbdeb3cd2f3d6da3502886a4333fda.tar.gz
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).