From dc089026b4ad0d2d9ea992c7f1b9b5e716dd82cd Mon Sep 17 00:00:00 2001 From: Maxwell Aladago Date: Sun, 25 Aug 2019 17:11:59 -0400 Subject: DOC: Clarify rules about broadcasting when empty arrays are involved. (#14313) * DOC: clarified rules about broadcasting when empty arrays are involved. --- numpy/doc/broadcasting.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'numpy/doc') diff --git a/numpy/doc/broadcasting.py b/numpy/doc/broadcasting.py index f7bd2515b..cb548a0d0 100644 --- a/numpy/doc/broadcasting.py +++ b/numpy/doc/broadcasting.py @@ -61,8 +61,7 @@ dimensions are compatible when If these conditions are not met, a ``ValueError: operands could not be broadcast together`` exception is thrown, indicating that the arrays have incompatible shapes. The size of -the resulting array is the maximum size along each dimension of the input -arrays. +the resulting array is the size that is not 1 along each axis of the inputs. Arrays do not need to have the same *number* of dimensions. For example, if you have a ``256x256x3`` array of RGB values, and you want to scale -- cgit v1.2.1