diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-05-12 18:35:52 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-05-12 19:15:36 -0700 |
commit | a3a19daff9330f0196aba90582450d022fc8798c (patch) | |
tree | 8e06f3ee5c05f8f77415d2e62df261f18fe89897 /numpy/lib/stride_tricks.py | |
parent | 0f19dae081e6678902826b195e0d3857c5b4c2b3 (diff) | |
download | numpy-a3a19daff9330f0196aba90582450d022fc8798c.tar.gz |
ENH: Allow broadcast to be called with zero arguments
Follows on from gh-6905 which reduced the limit from 2 to 1. Let's go all the way to zero.
Just as for `broadcast(broadcast(a), b)` is interpreted as `broadcast(a, b)` , this change interprets
`broadcast(broadcast(), a)` as `broadcast(a)`.
Diffstat (limited to 'numpy/lib/stride_tricks.py')
-rw-r--r-- | numpy/lib/stride_tricks.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/numpy/lib/stride_tricks.py b/numpy/lib/stride_tricks.py index 0dc36e41c..fd401c57c 100644 --- a/numpy/lib/stride_tricks.py +++ b/numpy/lib/stride_tricks.py @@ -186,8 +186,6 @@ def _broadcast_shape(*args): """Returns the shape of the arrays that would result from broadcasting the supplied arrays against each other. """ - if not args: - return () # use the old-iterator because np.nditer does not handle size 0 arrays # consistently b = np.broadcast(*args[:32]) |