summaryrefslogtreecommitdiff
path: root/numpy/doc
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/doc')
-rw-r--r--numpy/doc/broadcasting.py9
-rw-r--r--numpy/doc/indexing.py2
2 files changed, 6 insertions, 5 deletions
diff --git a/numpy/doc/broadcasting.py b/numpy/doc/broadcasting.py
index 1dc4f60bf..6c3a4bc75 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
+ ValueError: operands could not be broadcast together with shapes (4,) (5,)
>>> xx.shape
(4, 1)
diff --git a/numpy/doc/indexing.py b/numpy/doc/indexing.py
index 5f5033117..087a688bc 100644
--- a/numpy/doc/indexing.py
+++ b/numpy/doc/indexing.py
@@ -93,7 +93,7 @@ well. A few examples illustrates best: ::
[21, 24, 27]])
Note that slices of arrays do not copy the internal array data but
-also produce new views of the original data.
+only produce new views of the original data.
It is possible to index arrays with other arrays for the purposes of
selecting lists of values out of arrays into new arrays. There are