summaryrefslogtreecommitdiff
path: root/numpy/doc/broadcasting.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/doc/broadcasting.py')
-rw-r--r--numpy/doc/broadcasting.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/doc/broadcasting.py b/numpy/doc/broadcasting.py
index 1dc4f60bf..73fd2cdc3 100644
--- a/numpy/doc/broadcasting.py
+++ b/numpy/doc/broadcasting.py
@@ -53,9 +53,10 @@ dimensions are compatible when
2) one of them is 1
If these conditions are not met, a
-``ValueError: frames are not aligned`` 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.
+``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.
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
@@ -124,7 +125,7 @@ An example of broadcasting in practice::
(5,)
>>> x + y
- <type 'exceptions.ValueError'>: shape mismatch: objects cannot be broadcast to a single shape
+ <type 'exceptions.ValueError'>: operands could not be broadcast together with shapes (4,) (5,)
>>> xx.shape
(4, 1)