diff options
| author | Matti Picus <matti.picus@gmail.com> | 2021-07-12 13:03:28 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-12 13:03:28 +0300 |
| commit | c07080f12652b2cced2f6ca2cb3e72e085565047 (patch) | |
| tree | a5649e9f79ecfaf1720ded4d576ac8221b5769b0 /numpy | |
| parent | bb71b5fb7b65b662c1fffa3f8120cbfd02e2c164 (diff) | |
| parent | 2599a4c569dbdeb3cd2f3d6da3502886a4333fda (diff) | |
| download | numpy-c07080f12652b2cced2f6ca2cb3e72e085565047.tar.gz | |
Merge pull request #19445 from timhoffm/doc-broadcast_to
DOC: broadcast_to() supports int as shape parameter
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/lib/stride_tricks.py | 5 |
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). |
