8000 Merge pull request #19445 from timhoffm/doc-broadcast_to · numpy/numpy@c07080f · GitHub
[go: up one dir, main page]

Skip to content

Commit c07080f

Browse files
authored
Merge pull request #19445 from timhoffm/doc-broadcast_to
DOC: broadcast_to() supports int as shape parameter
2 parents bb71b5f + 2599a4c commit c07080f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

numpy/lib/stride_tricks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,9 @@ def broadcast_to(array, shape, subok=False):
371371
----------
372372
array : array_like
373373
The array to broadcast.
374-
shape : tuple
375-
The shape of the desired array.
374+
shape : tuple or int
375+
The shape of the desired array. A single integer ``i`` is interpreted
376+
as ``(i,)``.
376377
subok : bool, optional
377378
If True, then sub-classes will be passed-through, otherwise
378379
the returned array will be forced to be a base-class array (default).

0 commit comments

Comments
 (0)
0